Donald Trump has signed the first phase of a new trade agreement with China after two years of tension between the two superpowers that have rattled economies around the world.

Trump said: “Today, we are taking a momentous step towards a future of fair and reciprocal trade. Together we are righting the wrong of the past.”

“At long last Americans have a government that puts them first at the negotiating table,” he said. “This is the biggest deal anybody has ever seen.”

Trump and China’s chief trade negotiator, Liu He, signed the deal at a packed press conference, attended by Ivanka Trump, much of Trump’s cabinet, Henry Kissinger, and media and business leaders including Stephen Schwarzman, the chairman of Blackstone, and Ajay Banga, the president of Mastercard. The signing came hours after Democrats named the team that will prosecute Trump in an impeachment trial that starts early next week.

The first phase of the deal will further open the Chinese market to US companies, and includes roughly $200bn in Chinese purchases of American goods and services. But it will also leave in place much of the $360bn worth of tariffs that the US has already imposed on Chinese goods, and the threat of additional punishment if Beijing does not live up to the terms of the deal.

Trump campaigned on tackling what he saw as China’s unfair trade practices, accusing the country of “raping” the US and perpetuating “the greatest theft in the history of the world”.

The often rancorous trade dispute has hurt agriculture, manufacturing and other sectors of the US economy, and the uncertainty it has engendered has worried business leaders. But its impact on the broader economy does not appear to have been as dire as some predicted.

The trade deal, if it holds, could be a major political boost for Trump in an election year when he can argue his tough stance with China has paid off. US stock markets hit record highs after the signing.

The treasury secretary, Steven Mnuchin, called the deal a “very significant agreement” but said the Trump administration would impose further tariffs if China does not abide by the agreement and move to address other issues in the next phase of discussions.

“This gives China a big incentive to get back to the table and agree to the additional issues that are still unresolved,” Mnuchin told CNBC.

Although the deal is expected to give US companies greater protection for their trade secrets in China, big issues remain. The US wants China to address the huge subsidies it gives to industries including steel and solar panels that have allowed Chinese companies to dominate those markets with cheap exports. Beijing also rejected a call to include a pledge not to hack US companies, arguing such a promise was not part of a trade deal.

Trump said tariffs would remain in place until a second phase of the deal is signed.

This first phase “hardly addresses in any substantive way the fundamental sources of trade and economic tensions between the two sides, which will continue to fester,” said Eswar Prasad, a Cornell economist and and former head of the International Monetary Fund’s China division.

Mary Lovely, professor of economics at Syracuse University, described the deal as a “trade truce with large state-directed purchases attached”. Even so, she wrote, “the truce is good news for the US and the world economy.”

The phase one deal cancels planned US tariffs on Chinese-made cellphones, toys and laptop computers and halves the tariff rate to 7.5% on about $120bn worth of other Chinese goods, including flat panel televisions, Bluetooth headphones and footwear.

But it will leave in place 25% tariffs on a vast, $250bn array of Chinese industrial goods and components used by US manufacturers.

Agencies contributed to this report