HANOI/MUMBAI -- The trade spat between Washington and Beijing is providing a tailwind for garment production hubs like Bangladesh and Vietnam, as more companies move away from China to avoid U.S. tariffs and sanctions.

China is the world's largest exporter of apparel, with shipments of $158.4 billion last year, or more than 30% of the global total. But that is down from around 40% at the beginning of the decade, with apparel companies gradually migrating to neighboring countries with cheaper labor costs.

Bangladesh is one of those alternatives. The country is the world's second-largest apparel exporter, with a 6.4% share. Vietnam comes in third at 5.8%. Wages in Vietnam are less than half that in big Chinese cities like Shanghai and Guangzhou. Labor in Bangladesh is cheaper still.

American apparel companies are also diversifying suppliers out of China. U.S.-bound apparel exports from Bangladesh grew 14% on the year to $1.48 billion in the July-September period, and rose 3% in the year through June. Vietnam's apparel and textile exports are expected to climb 16% to a record $36 billion in 2018, according to an industry association. Apparel accounts for more than 10% of Vietnam's exports.

Recent increases in their apparel exports appear to come from production boosts at existing factories. And the trend is expected to accelerate further as American companies continue to move production beyond China in light of the trade war.

Apparel from China is currently not subject to extra U.S. tariffs, but it soon could be, the Donald Trump administration has signaled.

"Even the companies that were reluctant before are moving production out of China," said a source at a logistics company in Vietnam.

U.S. sanctions on Chinese technology companies are expected to accelerate the trend. The U.S. will prohibit government agencies from having any business dealings with companies that use communication equipment and surveillance cameras from five Chinese companies, including Huawei Technologies and ZTE, starting in August 2020.

A garment factory that uses equipment from these companies will not be allowed to supply uniforms or any other products to U.S. government agencies. And if a company is found to have made false statements about what equipment it uses, the U.S. could move to block its ability to carry out international transactions in dollars.

Given the widespread use of the blacklisted companies' products in China, moving out of the country altogether is the safest way to avoid problematic equipment.

For a nation like Bangladesh, where apparel makes up roughly 80% of exports, the economic benefits of this migration will be significant. The textile and apparel industry accounts for 20% of gross domestic product. Bangladesh is home to numerous contractors handling production for big apparel companies like Zara owner Inditex, Hennes & Mauritz and Uniqlo operator Fast Retailing.

Cambodia is another country emerging as an alternative production site, in part owing to its closeness with China diplomatically and economically. Since this fall, more textile businesses are securing land in an industrial park in the capital city of Phnom Penh, a source said.