Bangladeshi rescuers have pulled a woman alive from the ruins of a collapsed garment factory complex after she spent 17 days trapped in a basement under the rubble.

Hours after officials had announced the death toll had surged past the 1,000 mark, recovery teams who had long given up any hope of finding more survivors were stunned to hear the voice of a woman calling for help.

Reshma Begum was discovered near a Muslim prayer room in the basement of the eight-storey Rana Plaza building at the outskirts of Dhaka, where crews have been focused on recovering bodies, not rescuing survivors, since late April.

The 18-year-old, who used to work as a sewing machine operator in the factory, was in such good shape she was able to walk, according to one rescuer.

"There was some dried food around me. I ate the dried food for 15 days," Begum told the private Somoy TV from her hospital bed.

"The last two days I had nothing but water. I used to drink only a limited quantity of water to save it. I had some bottles of water around me.

"I would shout out for help but no one heard me."

Begum is understood to have finally got the attention of emergency workers when she took a steel pipe and began banging it.

Rescuers then ordered the cranes and bulldozers to immediately stop and used handsaws and welding and drilling equipment to cut through the iron rod and debris still trapping her.

They gave her water, oxygen and saline as they worked to free her.

'God is great'

They managed to extract her from the ruins in an operation broadcast live on television and watched by crowds at the scene who were asked by clerics to pray for her rescue.

Cries of "Allahu Akbar" - "God is great" - rang out from the crowd as Begum was pulled out of the rubble.

"It was a miracle. We lost all hopes of finding her alive. We visited every hospital in Dhaka and Savar. We visited the mortuaries and checked every dead body they pulled out," Begum's brother, Zahidul Islam, told AFP news agency.

"Then the news came this afternoon that a woman called Reshma has been found alive," said Islam.

A doctor at the Savar Combined Military Hospital said Begum appeared to be in good health despite her ordeal.

"Her heart is fine. Her breathing is fine. Her brain is functioning well. We [will know more] after getting her biochemical report," he said.

Government probe

News of the rescue came as recovery teams were preparing to wrap up their work at the site after discovering scores more corpses in the tangle of concrete.

A spokesman for the army, which is overseeing the recovery operation, said the death toll had reached 1,053, making it one of the world's worst industrial disasters.

More than 3,000 workers were on shift on the morning of April 24 when the building suddenly caved in.

Most were earning around $40 a month to make clothing for Western brands such as Italy's Benetton, Britain's Primark and the Spanish label Mango.

A preliminary government probe blamed vibrations from four giant generators on the upper floors for triggering the collapse.

Police have arrested 12 people including the plaza's owner and four factory bosses for forcing people to work on the day of the disaster, even though cracks appeared in the structure the day before.