Chinese President Xi Jinping on Saturday called for restraint and stressed that the heightened tensions over North Korea must be dealt with through peaceful means in a telephone conversation with U.S. President Donald Trump.

Xi was quoted by the Chinese Foreign Ministry as telling Trump that maintaining peace on the Korean Peninsula is in the common interest of both sides and any "words and deeds" that would escalate tensions should be avoided.

To solve the North Korea issue, Xi told Trump that "in the final analysis, it is necessary to adhere to the general direction of dialogue and negotiation, and a political settlement," according to the ministry.

Xi's remarks come at a time when Trump has been exchanging increasingly fiery rhetoric with North Korea over its arms development program and preparations for further provocations.

"Military solutions are now fully in place, locked and loaded, should North Korea act unwisely. Hopefully Kim Jong Un will find another path!" Trump said in his Twitter post on Friday, referring to the North Korean leader.

Trump and Xi agreed that North Korea must halt "its provocative and escalatory behavior" and that the additional sanctions imposed by the U.N. Security Council this month were needed for achieving peace and stability on the peninsula, the White House said.

They also reiterated they will strengthen cooperation toward the denuclearization of the peninsula and stay in close communication on other major issues, according to the Chinese ministry and the White House.

Despite the reaffirmation between the two presidents, the current tense situation persists after a threat from North Korea on Tuesday to fire ballistic missiles over Japan to land in waters near the U.S. Pacific territory of Guam.

North Korea has said it will develop a plan by mid-August to launch four missiles near the island, home to about 7,000 U.S. troops and 160,000 people.

Trump, in response, issued warnings throughout the week such as saying that North Korea would face "fire and fury like the world has never seen."

The tit-for-tat war of words heightened fears among regional countries over a possible conflict between Washington and Pyongyang.

North Korea, which test-fired two intercontinental ballistic missiles in July, has not shown any signs of taming its desire to upgrade its military capabilities.

North Korea has sharply reacted to the U.N. sanctions, backed also by China and Russia, in the wake of the two long-range missile tests, threatening to retaliate against the United States for playing an active role in formulating the new punitive measures.

The tougher international sanctions are aimed at slashing North Korea's $3 billion annual export revenue by a third, including a ban on all exports of coal, iron, iron ore, lead, lead ore and seafood.

North Korea has said it will "not waver or hesitate to use any form of ultimate means" if the United States continues with its "reckless attempts to stifle" Pyongyang.