MOSCOW (Reuters) - Russia and China called for restraint on North Korea on Monday after U.S. President Donald Trump warned over the weekend that “only one thing will work” in dealing with Pyongyang, hinting that military action was on his mind.

When asked what Russia made of Trump’s comments, Kremlin spokesman Dmitry Peskov told a conference call with reporters:

“Moscow has called and continues to call on the parties involved in the conflict and on those who have anything to do with this issue to exercise restraint and to avoid any steps that would only worsen the situation.”

Commenting on a Trump statement that the United States might withdraw from a nuclear deal with Iran, Peskov said such a move would have “negative consequences.”

Speaking in Beijing, Chinese Foreign Ministry spokeswoman Hua Chunying reiterated a call for all parties involved with the standoff in North Korea to exercise restraint, describing the situation as extremely complex and serious.

China hopes all sides do nothing to irritate each other or worsen the problem and speak and act cautiously, she told a daily news briefing.

In recent weeks, North Korea has launched two missiles over Japan and conducted its sixth nuclear test, all in defiance of U.N. Security Council resolutions, and may be fast advancing toward its goal of developing a nuclear-tipped missile capable of hitting the U.S. mainland.

Trump repeatedly has made clear his distaste for dialogue with North Korea. Last week, he dismissed the idea of talks as a waste of time, a day after Secretary of State Rex Tillerson said Washington was maintaining open lines of communication with North Korean leader Kim Jong Un’s government.

“Our country has been unsuccessfully dealing with North Korea for 25 years, giving billions of dollars & getting nothing. Policy didn’t work!” the U.S. president said in a Twitter post on Monday.

Trump’s comments seemed to further suggest that military action was on his mind.

On Saturday, Trump made a similar comment on Twitter about how negotiations have failed for 25 years and said “only one thing will work” with North Korea.