A seamstress buried for 17 days in the wreckage of a collapsed garment factory in Bangladesh was rescued Friday, a miraculous moment set against the unimaginable horror of the more than 1,000 dead recovered so far.

Reshma Begum was in such good shape she was able to walk, according to one rescuer. She said she survived on dried food and bottled water. She was discovered near a Muslim prayer room in the basement of the eight-story Rana Plaza building, where crews have been focused on recovering bodies, not rescuing survivors, since late April.

“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,” she told the private Somoy TV from her hospital bed as doctors and nurses milled about, giving her saline and checking her condition.

“No one heard me. It was so bad for me. I never dreamed I’d see the daylight again,” she said. “There was some dried food around me. I ate the dried food for 15 days. 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,” she said.

She finally got the crews’ attention when she took a steel pipe and began banging it, said Abdur Razzak, a warrant officer with the military’s engineering department who first spotted her in the wreckage. The workers ran into the dark rubble, eventually getting flashlights to free her, he said.

They 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.

When Begum was freed after 40 minutes, the crowd erupted in wild cheers. Soldiers and men in hard hats carried Begum, wearing a pink outfit with a violet scarf, on a stretcher to a waiting ambulance, which brought her to a military hospital. But her rescuers said she was in shockingly good condition, despite her ordeal. Razzak said she could even walk.

“She was fine, no injuries. She was just trapped. The space was wide,” said Lt. Col. Moyeen, an army official at the scene who uses only one name.

Doctors at the hospital told Bangladeshi television that Begum was out of danger and her kidney and liver function were fine.

Begum told Somoy TV she was working in the factory on the second floor when the building began collapsing around her. She raced down a stairwell into the basement, where she became trapped by the wreckage in a pocket that allowed her to survive.

Begum told her rescuers there were no more survivors in her area. Workers began tearing through the nearby rubble anyway, hoping to find another person alive.

“Reshma told me there were three others with her. They died. She did not see anybody else alive there,” said Maj. Gen. Chowdhury Hasan Suhrawardy, the head of the local military units. The bodies were eventually recovered from another section of the building not far from Begum, he said.

Begum’s sister Asma said she and her mother kept a vigil for the seamstress, who is from the rural Dinajpur district, 170 miles north of Dhaka. She said they had been losing hope amid the endless string of grim days, when only scores of dead bodies were removed from the rubble.

“We got her back just when we had lost all our hope to find her alive,” she told Somoy TV. “God is so merciful.”

More than 2,500 people were rescued in the immediate aftermath of the April 24 disaster, but crews had recovered several hundred bodies without finding a survivor before Begum emerged.