NEW YORK - Some of the world's largest retailers have agreed to a first-of-its-kind pact to improve safety at some of Bangladesh's garment factories. The move comes nearly three weeks after a building collapse in the country killed more than 1,100 workers.

H&M, a trendy Swedish chain that's the largest clothing buyer in Bangladesh, on Monday said it would sign a five-year, legally binding contract that calls for retailers to take on a greater role in ensuring the garment factories in Bangladesh are safe.

Within hours, C&A of the Netherlands, British retailers Tesco and Primark, and Spain's Inditex, owner of the Zara chain, followed with their own announcements.

The companies join two other retailers that signed the agreement last year: PVH, which makes clothes under the Calvin Klein, Tommy Hilfiger and Izod labels, and German retailer Tchibo. The agreement has since been expanded to five years from two.

The pact requires that the companies conduct independent safety inspections, make their reports on factory conditions public and cover the costs for needed repairs. It also calls for them to pay up to $500,000 annually toward the effort, to stop doing business with any factory that refuses to make safety upgrades, and to allow workers and their unions to have a voice in factory safety.

The safety agreement was applauded by labor groups who say it goes a long way toward improving working conditions in Bangladesh's garment industry, which long have been known to be potentially dangerous.

Based on the seven companies that plan to participate in the pact, between 500 and 1,000 of the 5,000 factories operated in Bangladesh will be covered, according to Scott Nova, executive director of the Worker Rights Consortium, which had been one of the organizations pushing for the agreement.

"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," he said.

The pact comes as the working conditions of Bangladesh's garment industry have come under increased scrutiny. Since 2005, at least 1,800 workers have been killed in the Bangladeshi garment industry in factory fires and building collapses, according to research by the advocacy group International Labor Rights Forum.

The two latest tragedies in the country's garment industry have raised the alarm. The building collapse on April 24 was the industry's worst disaster in history. And it came after a fire in another garment factory in Bangladesh in November killed 112 workers.

Following the latest tragedy, Walt Disney Co. announced this month that it is stopping production of its branded goods in Bangladesh. But most retailers have vowed to stay and promised to work for change.