A man who died when a burning tower block collapsed in Brazil's largest city, São Paulo, was only seconds away from being rescued, firefighters say.
Ricardo Oliveira Galvão Pinheiro, 39, had gone back into the building to alert others when he was trapped by the flames.
Firefighters threw him a rope and a harness from a neighbouring building.
But before he could tie it around himself, the building collapsed and he was buried beneath the burning rubble.
'Accident waiting to happen'
The building in central São Paulo once housed the federal police offices but was vacated by the force years ago.
About 250 people are believed to have been staying in the crumbling 26-storey tower when a fire broke out in the early hours of Tuesday.
Wood used to divide the floors into living spaces fuelled the flames. The fire spread rapidly from the lower floors through the empty lift shafts which acted like a chimney.
São Paulo Governor Márcio França described it as "an accident waiting to happen".
According to residents, Mr Pinheiro, whom they called Tattooed, had already escaped the blaze when he decided to help those on the higher floors get out.
Jéssica Matos, 20, told Folha newspaper that she passed Ricardo on the second floor of the staircase. "I'm going upstairs to send the people down," he reportedly shouted.
Gerivaldo Araújo told Brazil's G1 news portal that Mr Pinheiro had wanted to help the most vulnerable. "Many women lived alone and had children and he came back to help rescue these families," the 42-year-old resident said.
Another resident said that Mr Pinheiro, who had an image of Batman tattoed on his neck, had acted like a hero himself.
A man who said that he worked with Mr Pinheiro unloading fruit and vegetable at the market said he had begged his friend not to go back into the building but that he insisted.
'Get me out'
As the building filled with smoke and flames, he could not get down again. A firefighter spotted him clinging to a lightning rod high up on the building's wall.
Sgt Diego Pereira Santos, who was evacuating people from the neighbouring building, said he was able to speak to Mr Pinheiro from a 15th-floor window.
"I begged him not to jump because the spot where he was was stable," the firefighter told Folha.
Sgt Santos and his colleagues smashed a hole in the wall of the neighbouring building through which they were able to throw a rope and harness to Ricardo.
"He was shouting 'Get me out of here, please'," Sgt Santos said.
According to the sergeant, Mr Pinheiro had started getting into the harness when the building collapsed, the weight of the collapsing structure snapping the rope.
"It would have taken 30 to 40 seconds to complete the process," Sgt Santos said of the failed rescue.
Firefighters found the harness they threw to Mr Pinheiro in the rubble but so far have found no trace of him.
They are also searching for 44 people who regularly stayed in the building but it is not clear if they were inside at the time of the fire.
Almost 250 residents have been moved to shelters. Many described Mr Pinheiro as "a gentle man" who loved to skate in his free time.
The cause of the blaze is still being investigated.