The ongoing trade war with the United States might see as many as 5 million Chinese lose their jobs if and when it worsens, estimates JPMorgan Chase & Co., an American investment bank that's also one of the largest asset management companies in the world.

At a minimum, the trade war might cost China 700,000 jobs, said the firm. A hefty devaluation of the yuan is seen as the only way to prevent job losses on this scale.

JPMorgan said the enormous job losses will come about if tit-for-tat retaliation by the U.S. and China continue. What will trigger these new job losses will be the U.S. going ahead with its threat to impose 25 percent tariffs on $200 billion in Chinese exports. This might occur within the month, at the earliest, but will likely take place given Trump's animosity towards Chinese president Xi Jinping.

Another factor will be China retaliating by devaluing the already weak yuan by five percent and imposing retaliatory tariffs on U.S. exports. Even if China doesn't retaliate, three million Chinese might lose their jobs, said a report written by a team of JPMorgan economists led by Haibin Zhu.

The study notes the trade war's unfortunate timing, coming as it does when China is grappling with a slowing pace of growth and a massive debt pile it wants to undo by containing the shadow banking industry.

JPMorgan estimates things turn for the worse if the U.S. does impose 25 percent tariffs on all Chinese imports and China retaliates. Taken together, these twin moves mean 5.5 million lost jobs and 1.3 percentage points eliminated from China's gross domestic product growth.

JPMorgan economists said if the United States escalates the tariff war, even more, the negative impact on China will be greater.

Their report said that while the overall impact from the trade war thus far remains manageable, rising unemployment might become a major policy concern for Beijing because of its huge potential to trigger social unrest.

If unemployment increases sharply, it will change Beijing's policy reaction. The People's Bank of China (PBOC) will be forced to devalue the yuan and take more policy easing measures to protect Chinese jobs.

A cheaper yuan will help China's already strained economy weather the immense shock of a new round of U.S. tariffs. Devaluing the yuan by some 12 percent in 2019 compared to 2018 will help offset the negative effect s of the trade war on China's GDP and narrow the net job losses to 0.9 million, said JPMorgan.

The downside to devaluing the yuan will be $332 billion in capital outflows or more than a tenth of China's precious foreign exchange reserves.