China agreed to limit shipments of 10 types of textiles to the European Union through 2007, repairing relations between the world's two biggest clothing exporters.

The accord "heads off a trade irritant that was threatening to mushroom into a dispute," E.U. Trade Commissioner Peter Mandelson said at a midnight news briefing in Shanghai after more than 10 hours of talks with Chinese Commerce Minister Bo Xilai.

The agreement limits 10 products, including T-shirts and flax yarn, to import growth "in the region of 10 percent a year," the E.U. said in a statement. It also helps China avert more stringent E.U. restrictions, something it wasn't able to avoid in a similar dispute with the U.S. government. Chinese officials expect to resume talks with the United States later this month.

Mandelson traveled to China in a bid to hammer out a deal to moderate surging textile exports to the 25-nation European Union that were worth $19.6 billion last year, according to E.U. data.

Last month, Mandelson gave China until June 11 to slow exports of T-shirts and flax yarn or face E.U. restrictions. In a similar dispute with the United States, China this year became subject to quotas on more than $2 billion of its clothing exports.