Bangladeshi women cry for their missing relatives during a prayer ceremony for the souls of the 1,127 people who died in a garment building structure collapse last month, in Savar, near Bangladesh, Tuesday, May 14, 2013. The Islamic prayer service was held a day after the army ended the nearly three-week, painstaking search for bodies among the rubble of the worst tragedy in the history of the global garment industry and turned control of the site over to the civilian government for cleanup. A Bangladesh army soldier cries he offers prayers for the souls of the 1,127 people who died in the garment building structure collapse last month, in Savar, near Bangladesh, Tuesday, May 14, 2013. Bangladesh army soldiers stand at the wreckage of a Bangladeshi garment factory building to offer prayers for the souls of the 1,127 people who died in the structure's collapse last month, in Savar, Bangladesh, Tuesday, May 14, 2013. Bangladesh army soldiers, police personnel and firefighters gather at the wreckage of a Bangladeshi garment factory building to offer prayers for the souls of the 1,127 people who died in the structure's collapse last month, in Savar, Bangladesh, Tuesday, May 14, 2013. Bangladeshi women offer prayers for the souls of the 1,127 people who died in the garment building structure collapse last month, in Savar, Bangladesh, Tuesday, May 14, 2013. DHAKA, Bangladesh (AP) - Thousands of mourners gathered Tuesday at the wreckage of a Bangladeshi garment factory building to offer prayers for the souls of the 1,127 people who died in the structure's collapse last month, the worst tragedy in the history of the global garment industry. The Islamic prayer service was held a day after the army ended a nearly three-week, painstaking search for bodies among the rubble and turned control of the site over to the civilian government for cleanup. Recovery workers got a shocking boost Friday when they pulled a 19-year-old seamstress alive from the wreckage. But most of their work entailed removing corpses that were so badly decomposed from the heat they could only be identified if their cellphones or work IDs were found with them. The last body was found Sunday night. Soldiers in camouflage, police and firefighters in uniform stood solemnly in neat rows near relatives of the dead. Many of the rescue workers had pained expressions on their faces. Tears rolled down the cheeks of one soldier. The mourners raised their cupped hands in prayer and asked for the salvation of those who lost their lives when the Rana Plaza building came crashing down on April 24. They also appealed for divine blessings for the injured still in the hospital. Maj. Gen. Chowdhury Hasan Suhrawardy, the military commander who had been supervising the site, thanked all those involved in the work. He said the army has prepared a list of 1,000 survivors that it would give to the government with the recommendation they be provided jobs on a priority basis. The tragedy came months after a fire at another Bangladesh garment factory killed 112 workers. With global pressure mounting on Bangladesh and the brands it manufactures for, several of the biggest Western retailers embraced a plan Monday that would require them to pay for factory improvements here. Swedish retailing giant H&M, the biggest purchaser of garments from Bangladesh; British companies Primark and Tesco; C&A of the Netherlands; and Spain's Inditex, owner of the Zara chain, said they would sign a contract that requires them to conduct independent safety inspections of factories and cover the costs of repairs. The pact also calls for them to pay up to $500,000 a year toward the effort and to stop doing business with any factory that refuses to make safety improvements. Among the big holdouts are Wal-Mart Stores, which is the second-largest producer of clothing in Bangladesh, and Gap. Gap, which had been close to signing the agreement last year, said Monday that the pact is "within reach," but the company is concerned about the possible legal liability involved. "This agreement is exactly what is needed to finally bring an end to the epidemic of fire and building disasters that have taken so many lives in the garment industry in Bangladesh," said Scott Nova, executive director of the Worker Rights Consortium, one of the organizations pushing for the agreement. Bangladesh has about 5,000 garment factories and 3.6 million garment workers. On Monday, Bangladesh's Cabinet approved an amendment lifting restrictions on forming unions in most industries, government spokesman Mosharraf Hossain Bhuiyan said. The old 2006 law required workers to obtain permission before they could unionize. The day before, the government set up a new minimum wage board that will issue recommendations to the Cabinet for pay raises for garment workers. Government officials also have promised improvements in safety in an industry where at least 1,800 people have been killed in factory fires or building collapses since 2005. In 2010 the government launched an Industrial Police force to crush street protests by thousands of workers demanding better pay and working conditions.