DHAKA, Bangladesh—Rescue workers Friday pulled a female garment worker from the rubble of Rana Plaza after more than 16 days buried alive—among the longest periods anyone has survived such an ordeal. The eight-story building, which housed five garment factories outside the capital Dhaka, collapsed April 24, killing more than 1,000 people in one of the worst-ever industrial accidents. Almost two weeks after the last survivor was found, army rescuers broke through a mass of concrete and steel and carried out Reshma Akter Begum, a seamstress in her 20s who relatives said had moved to the city four years ago with her young son to earn her own way in life. She told her rescuers that she had fallen from the third floor and landed in a Muslim prayer room in the basement along with three other workers—who soon died of injuries from the fall. Although the ceiling had caved in there was enough room for her to stand and move about in the pitch-black darkness, and she forced a broken pipe up through a crack for ventilation. She said she scavenged food and bottled water from the backpacks of her dead colleagues, but it had run out two days ago. Many times she heard voices, she told her rescuers, but her attempts to attract attention had failed. On Friday, she started banging the pipe against the concrete again after bulldozers had removed loose rubble that had been covering the area. "I heard the sound and rushed towards the spot," Abdur Razzaq, an army sergeant who was involved in the rescue, said in an interview. "I knelt down and heard a faint voice. 'Sir, please help me,' she cried." The rescue was broadcast live on national television. As she was lifted from the rubble, crowds that had gathered broke into cheers of "God is great!" Rescue workers wiped away tears. "It's a miraculous event," Prime Minister Sheikh Hasina said after visiting Ms. Begum in the hospital and congratulating the rescue teams. Ms. Begum told rescuers she was unhurt. She had been buried for 16 days and about seven hours in a space around 30 feet long and 15 feet wide, according to rescue workers, during one of the hottest times of the year, with temperatures reaching 95 degrees (35 degrees Celsius) and 80% humidity. Her hair and face were covered in dirt as she was carried out on a stretcher, wearing a purple and pink salwar-kameeze, and her scalp was showing where she had apparently lost big clumps of hair. Doctors who attended her at a nearby military hospital said she was suffering from dehydration but otherwise appeared to have no major injuries. Without food, most people could survive for eight weeks or so; however, without water a person can only live for three to five days. Two other factors likely helped her survive: Since she couldn't move around much, she conserved a great deal of energy. And though the temperature must have been fierce during the day, it would have been cooler at night, which would also have allowed her to lose less water through sweat. As for her apparent hair loss, experts said it could have been stress-related. "The state of being starved is a hugely stressful condition, and people respond in different ways," said Rick Miller, spokesman for the British Dietetic Association. "That could have induced the temporary hair loss." At the hospital, a woman who identified herself as Ayesha Begum, Reshma's sister, said she and another woman who identified herself as Reshma's aunt had been waiting outside the building for two weeks. "We'd given up hope," Ayesha Begum said. "God has brought her back for the sake of her little son." Reshma Begum came from the northern district of Dinajpur, according to Ayesha Begum. She said her sister had come to Dhaka four years ago to work in a garment factory so as to become more independent. Reshma recently had separated from her husband and was bringing up her 5-year-old son, working as a seamstress in the New Wave Bottoms factory in Rana Plaza, she said. The crowds around the disaster site had thinned in recent days, but on Friday evening, families clutching photos of missing loved ones were once again thronging the area hoping to see their relatives brought out alive. "God is merciful," said Afsar Ali, who said he was looking for his daughter. "We still have hope." There has been controversy in Bangladesh over the pace of the rescue operations. Right after the disaster, the Bangladesh government turned down an offer of help from the U.N. Office for the Coordination of Humanitarian Affairs, a spokesman for the office said. In the first few days, volunteers were heavily involved, some using their bare hands. People held up handwritten signs asking for donations of oxygen cylinders, drills and water bottles. Some relatives of those missing, angered by the lack of heavy-lifting equipment, clashed with police at the site. Later, the army, which now is coordinating efforts, moved in with bulldozers and other heavy machinery. They have defended the pace of the rescue efforts, saying they were careful not to go too quickly and kill possible survivors. Maj. Gen. Hasan Suhrawardy, who is leading the army's salvage operation, said the pace would now slow again, since Ms. Begum's survival had raised hopes, however slight, that other survivors could be in the wreckage. Bulldozers stopped plowing the debris for a few hours after Ms. Begum was discovered, before starting operations again gingerly under flashlights. Briefing reporters at the building collapse site, Gen. Suhrawardy said: "Reshma is totally OK. She worked hard to keep herself alive. That is a very strong woman." The last known survivor before Friday was killed on April 28 by a fire set off inadvertently by rescuers who were trying to cut through to free her. The tragedy has shocked Bangladesh and the world, putting pressure on the government and foreign brands to improve safety conditions in the country's 5,000 factories. Bangladesh is one of the world's largest producers of garments, supplying major U.S. and European retailers. The industry produces some of the world's cheapest clothes, paying workers monthly wage rates as low as $40, a quarter those of China's. The government this week has begun an inspection of the country's factories. On Wednesday, the government forced 18 factories to shut while they carried out safety improvements, including three owned by the country's largest exporter of garments. There have been few instances of people surviving longer than 10 days after disasters like earthquakes, according to academic studies. In 2010, after the Haiti earthquake, a teenage girl was rescued 15 days after the disaster. The United Nations, which coordinates disaster relief, normally calls off search and rescue operations after a week or so and shifts to tending to survivors. Over the past 10 days, workers at Rana Plaza were focused on recovering hundreds of bodies that lay under rubble. The death toll has jumped by about 100 each day since Saturday, as salvage workers combed through the ground floor and basement. On Friday, the toll rose to 1,050 people.