OSAKA, Japan — President Donald Trump and China's Xi Jinping agreed to a cease-fire Saturday in their nations' yearlong trade war, averting — at least for now — an escalation feared by financial markets, businesses and farmers.

Trump said existing U.S. tariffs would remain in place against Chinese imports while negotiations continue, but that additional tariffs he's threatened to slap on billions worth of other Chinese goods will not be triggered for the "time being." He added that the U.S. and China would restart stalled trade talks, saying, "we're going to work with China where we left off."

Trump spoke after a lengthy meeting with Xi on the margins of the Group of 20 summit in Osaka. The U.S. president pronounced relations with China "right back on track," but doubts persist about the two nations' willingness to compromise on a long-term solution.

The apparent truce continues a pattern for talks between Trump and Xi, who have more than once professed their friendship and hit pause on protectionist measures, only to see negotiations later break down over contentious details.

Eleven rounds of talks have so far failed to end the standoff. The United States has imposed 25% import taxes on $250 billion in Chinese products and is threatening to target another $300 billion — a move that would extend the tariffs to virtually everything China ships to the United States. China has lashed back with tariffs on $110 billion in American goods, focusing on agricultural products in a direct and painful shot at Trump supporters in the U.S. farm belt.

Saturday's meeting between the two leaders was the centerpiece of four days of diplomacy in Asia for Trump, whose re-election chances have been put at risk by the trade war that has hurt American farmers and battered global markets. Tensions rose after negotiations collapsed last month.

Trump said the talks with Xi went "probably even better than expected."

Seated across a lengthy table flanked by top aides, both leaders struck a cautiously optimistic tone after they posed for photographs.

"We've had an excellent relationship," Trump told Xi as the meeting opened, "but we want to do something that will even it up with respect to trade."

Xi, for his part, recounted the era of "ping-pong diplomacy" that helped jump-start U.S.-China relations two generations ago. Since then, he said, "one basic fact remains unchanged: China and the United States both benefit from cooperation and lose in confrontation."

"Cooperation and dialogue are better than friction and confrontation," he added.

The meeting with Xi was one of three Trump engaged in Saturday with world leaders displaying authoritarian tendencies.

Trump had his first face-to-face sit-down with Saudi Arabia's Mohammed bin Salman since the U.S. intelligence community concluded that the crown prince directed the grisly murder of Washington Post columnist and American resident Jamal Khashoggi last year.

Trump, who referred to Prince Mohammed as his "friend," has long sought to minimize the crown prince's role in the murder and has been reluctant to criticize the killing of the royal critic at a Saudi consulate in Turkey last year. Trump views the kingdom as the lynchpin of U.S.' Middle East strategy to counter Iran.

In a wide-ranging news conference after the summit, Trump called the killing of Khashoggi "horrible," but said Saudi Arabia had "been a terrific ally." He suggested he was satisfied with steps the country is taking to prosecute some of those involved, while claiming that "nobody so far has pointed directly a finger" at Saudi Arabia's future king. U.S. intelligence officials have concluded that bin Salman must have at least known of the plot.

The summit came a week after Trump pulled back from ordering a military strike on Iran after it downed an American unmanned spy plane, and as it stands on the threshold of breaching uranium enrichment thresholds set in a 2015 nuclear deal. Trump said he wouldn't preview his response should Iran top the limit, but warned, "We cannot let Iran have a nuclear weapon."

Trump also met Saturday with Turkish President Recep Tayyip Erdogan, an ostensible NATO ally whom the U.S. sees as drifting dangerously toward Russia's sphere of influence.

With Erdogan, Trump said the leaders will "look at different solutions" to Turkey's planned purchase of the Russian-made S-400 surface-to-air missile system. U.S. officials have threatened to halt the sale of U.S.-made F-35 Joint Strike Fighter to Turkey if the Russian purchase goes through, but Erdogan has called it a done deal.

"Turkey has been a friend of ours," Trump said. He blamed the Obama administration for not agreeing to sell U.S.-made Patriot missile batteries to Turkey, calling the situation a "mess" and "not really Erdogan's fault."

A day earlier, Trump met with Russia's Vladimir Putin and, with a smirk and a finger point, jokingly told him, "Don't meddle with the election." It was their first meeting since the special counsel concluded that Russia extensively interfered with the 2016 campaign.

Pressed Saturday on whether he pushed the issue more seriously in private, Trump said he had raised it with Putin, adding, "You know he denies it, totally. How many times can you get someone to deny something?"

China and the U.S. are sparring over the Trump administration's allegations that Beijing steals technology and coerces foreign companies into handing over trade secrets. China denies it engages in such practices. The U.S. has also tried to rally other nations to block Chinese telecom firm Huawei from their upcoming 5G systems, branding the company a national security threat and barring it from buying American technology.

Trump said Saturday he would allow U.S. companies to sell their products to Huawei, but he was not yet willing to remove the company from a trade blacklist.

___

Associated Press writers Patrick Quinn in Bangkok and Paul Wiseman, Darlene Superville and Jill Colvin in Washington contributed to this report.

___

Follow Lemire on Twitter at http://twitter.com/@JonLemire and Miller at http://twitter.com/@zekejmiller