On April 24, Reshma Begum was working in a factory on the second floor of Rana Plaza when the building began collapsing around her. She raced down a stairwell into the basement, where she became trapped near a Muslim prayer room in a wide space that allowed her to survive.
"At some point I fell asleep but suddenly I woke up and it was difficult to know whether it was day or night," Begum was quoted as saying by Major Moazzem Hossain, who was involved in the rescue on Friday.
Her long hair got stuck under the rubble, but she used sharp objects to cut her hair and free herself, according to Major General Chowdhury Hasan Suhrawardy, the head of the local military units in charge of the disaster site.
For 17 days, the woman, a seamstress, lay trapped in a dark space in the basement beneath thousands of tonnes of wreckage as temperatures outside climbed into the mid-30s Celsius. She rationed food and water. She banged a pipe to attract attention. But she was fast losing hope of ever making it out alive.
In the ruins of the collapsed eight-storey garment factory building, the frantic rescue operation had long ago ended.
Hours before Begum was found, emergency crews had pulled the 1,000th corpse from the heap of rubble, twisted metal and machinery.
Before Friday, the last survivor had been found on April 28, and even her story ended tragically. As workers tried to free Shahina Akter, a fire broke out and she died of smoke inhalation.
Crews were instead engaged in the painstaking work of trying to remove bodies so the victims' families could bury their loved ones. They eventually approached the section where Begum was trapped.
"I heard voices of the rescue workers for the past several days. I kept hitting the wreckage with sticks and rods just to attract their attention," Begum said.
She finally got the crews' attention when she took a steel pipe and began banging it,
"I heard her say, 'I am alive, please save me'. I gave her water. She was OK," said Miraj Hossain, a volunteer who crawled through the debris to help cut Begum free.
The miraculous moment came when salvage workers pulled her to safety. She was in surprisingly good condition, wearing a violet outfit with a large, bright pink scarf.
The rescue was broadcast on television across Bangladesh. The prime minister rushed to the hospital, as did her family.
After the building collapsed, Begum's mother, Zobeda Begum, spent sleepless nights rushing from one place to another looking for her daughter. When they found out she had been rescued, she raised her hands in prayers.
"I just could not believe it when I saw her in the hospital," the mother, a frail woman in her 60s, said tearfully.
Begum's journey to the factory floor was typical of a generation of young Bangladeshi women who have sought to escape lives of rural drudgery by taking jobs in a burgeoning garment industry.
Her brother, Zahidul Islam, said their family lived in a village 414 kilometres north of Dhaka.
Three years ago, Begum moved to Dhaka, Islam said, joining several million women working in factories that supply retailers including Wal-Mart Stores, Tesco and H&M.
After finding her first job she married, Islam said, but her husband began to pilfer her earnings and she soon left him.
"He beat her brutally, which forced her to divorce him," Islam said.
On April 2, Begum found a job at New Wave Bottoms, a garment maker on the second floor of Rana Plaza, the building that imploded a day after its owner assured nervous workers it would stand "for a century".
Associated Press, Reuters