The world’s top two economies on Thursday were due to resume fraught trade talks just as a truce between them verged on collapse, with hostilities poised to escalate after months of seemingly collegial negotiations. Rather than sealing a deal this week — as officials in both countries had previously hinted was possible — Chinese trade envoy Liu He instead returns to the bargaining table just hours before Washington is due ramp up tariffs on hundreds of billions of dollars in his country’s most valuable exports. President Donald Trump tweeted Wednesday that Liu still wanted to “make a deal” but late in the day China vowed to retaliate by taking “necessary countermeasures” should Trump persist in more than doubling the tariffs on Friday. This was not how the week was initially meant to go. The sudden rupture has roiled global stock markets this week, inflaming anxieties among exporters, markets and industries that had been lulled into optimism in recent months as both sides steadily announced progress in their efforts to end the trade war Trump started last year. American officials this week accused their Chinese counterparts of retreating from major planks of an agreement they had been working toward since early in the year that aims to resolve Washington’s grievances of industrial theft, massive state intervention in markets and a yawning trade deficit. Scott Kennedy, a China trade and economics expert at the Center for Strategic and International Studies, told AFP on Wednesday that the negotiating teams were unfamiliar with each other. “The possibilities for miscalculation on both sides is pretty high,” he said, adding that the Chinese had apparently misjudged the American side’s intolerance for backtracking. “It turns out the Chinese had pulled out an eraser and started taking back things that they had offered,” said Kennedy. “They didn’t realize when they pulled their concessions off the table that the administration would have the reaction that it did.” Since last year, the two sides have exchanged tariffs on more than $360 billion in two-way trade, gutting US agricultural exports to China and weighing on both countries’ manufacturing sectors. US Trade Representative Robert Lighthizer released an official notice on Wednesday making the tariff increase a virtual fait accompli. Duty rates on a vast array of Chinese-made electrical equipment, machinery, auto parts and furniture will jump to 25 percent at midnight Thursday (0400 GMT Friday), a painful leap up from the 10 percent first imposed last year. Washington has demanded far-reaching and profound changes to the Chinese economy, such as submitting state enterprises to market principles, reducing massive subsidies and ending the alleged theft of US technology. Analysts say China will be reluctant to make many of these changes, which could undermine the Communist Party’s political power.