Donald Trump has hit out at the “very one-sided and unfair” trade relationship between the US and China, but stopped short of criticising Chinese President Xi Jinping.

The US president said Beijing “must immediately address the unfair trade practices that drive” what he said is a “shockingly” large trade deficit, along with barriers to market access, forced technology transfers and intellectual property theft.

“But I don’t blame China,” he added. “After all, who can blame a country for being able to take advantage of another country for the benefit of its citizens?”

To applause, Mr Trump said: “I give China great credit.”

His comments came during his second day in China and after lengthy meetings with Mr Xi. The day included announcements that the US and China had signed agreements valued at more than 250 billion dollars (£190bn) for products including jet engines, motor parts, liquefied natural gas (LNG) and beef.

Such contract signings are a fixture of foreign leaders’ visits to Beijing and are intended to defuse foreign complaints about China’s trade policies. Many of the new contracts appeared to represent purchases that Chinese mobile phone makers, airlines and other customers would have made anyway, but were saved to be announced during Mr Trump’s visit.

It was unclear if the pledges extend beyond a US-China trade agreement announced in May that featured LNG and beef exports to China.

Mr Trump had made narrowing the multibillion-dollar US trade deficit with China a priority for his administration. During the presidential campaign, he accused Beijing of “raping our country” on trade and pledged to minimise the trade imbalance.

China’s trade surplus with the US in October widened by 12.2 per cent from 2016, to $26.6bn (£20.2bn), according to Chinese customs data.

Mr Xi promised a more open business environment for foreign companies in China and said his country was committed to further opening its economy to foreign investment.

“China will not close its doors” and will open them “even wider”, he said, pledging that foreign companies in China, including American ones, would find the market “more open, more transparent and more orderly”.