HAMBURG (Reuters) - U.S. President Donald Trump took a conciliatory tone on Saturday at a meeting with Chinese President Xi Jinping where the leaders agreed to keep working on two pressing issues: the nuclear threat posed by North Korea and bilateral trade irritants.

Trump campaigned in last year’s presidential election on cracking down on China for its trade practices, but he softened his rhetoric after taking office, saying he wanted to work with China on the nuclear issue.

When the two leaders first met in April at Trump’s Florida resort, they appeared to hit it off. Trump called Xi a “good man” as he urged him to use Beijing’s economic clout to force North Korea to curb its nuclear weapons program.

Lately, Trump has expressed some impatience on China’s role in North Korea - particularly after Pyongyang launched an intercontinental ballistic missile that some experts believe could have the range to reach Alaska, and parts of the U.S. West Coast.

His administration made new arms sales to Taiwan, imposed sanctions on two Chinese citizens and a shipping company and put China on a global human trafficking list. It also accused a Chinese bank of laundering money for Pyongyang.

The White House is also debating trade actions against Beijing, including tariffs on its steel exports and a few days before the G20 talks, Trump complained that trade between China and North Korea had grown.

But he showed none of that impatience on Saturday, when the leaders met at the invitation of Xi at the tail end of the G20 in Germany.

“It’s an honor to have you as a friend,” Trump told Xi, telling him he appreciated actions he had already taken on North Korea.

“As far as North Korea is concerned, we will have, eventually, success. It may take longer than I’d like. It may take longer than you’d like. But there will be success in the end one way or the other,” Trump said.

Speaking to reporters later on Air Force One, U.S. Treasury Secretary Steven Mnuchin said the Trump-Xi meeting lasted over an hour-and-a-half, and they had “substantive discussions” about how to deal with North Korea together.

“In regards to China, we had very direct discussions about North Korea. We had very direct discussions about military and security cooperation,” Mnuchin said.

“I think that President Trump made very clear to President Xi that he is focused on this issue, and wants to move forward and make progress. And I think President Xi gave a very interesting perspective from their standpoint,” he added.

‘CONTROL THE SITUATION’

Slideshow ( 3 images )

For his part, Xi told Trump that stronger China-U.S. ties were conducive to stability and prosperity amid global conflicts, and had made “new progress” in some areas “despite some sensitive issues”, Xi said, according to state news agency Xinhua.

Xi stressed the importance of talks with North Korea, and said China’s navy will join next year’s U.S.-led Pacific Rim military exercises.

Xinhua said Xi stressed to Trump China’s position that it adheres to the denuclearization of the Korean peninsula and maintaining peace and stability there.

Slideshow ( 3 images )

While China has been angered by North Korea’s repeated nuclear and missile tests, it also blames the United States and South Korea for worsening tension with their military exercises.

“China has many times talked about its principled position, namely that at the same time as the international community making necessary responses to North Korean acts that go against U.N. Security Council resolutions, they must step up efforts to promote talks and manage and control the situation,” Xinhua said, citing Xi.

Xi also reiterated China’s opposition to the U.S. deployment of the Terminal High Altitude Area Defense (THAAD) anti-missile system in South Korea, Xinhua said. China says THAAD threatens its security, despite U.S. and South Korean assurances it is aimed only at defending against North Korea.

Both leaders agreed to maintain close communication and coordination on the Korean peninsula nuclear issue, Xinhua said.

In a statement released on Sunday, Chinese Foreign Minister Wang Yi said Xi and Trump had “enhanced mutual understanding” about the North Korea issue and “confirmed the broad direction of using peaceful means to resolve this issue”.

Trump also mentioned trade imbalances in his meeting with Xi, calling it a “very, very big issue” that he would address.

“I know that China in particular, which is a great trading partner, we will be able to do something that will be equitable and reciprocal,” Trump said.

Senior officials from both countries will meet in Washington on July 19 to discuss economic and trade issues.