Chinese President Xi Jinping told President Trump in a phone call Wednesday that Beijing is willing to work with Washington on ending North Korea’s nuclear weapons program, but wants to do so through peaceful means.

"Had a very good call last night with the President of China concerning the menace of North Korea," Trump tweeted Wednesday morning.

Xi told Trump that China insists on peace and stability on the Korean Peninsula in the wake of the deployment of the USS Carl Vinson to the area and the conducting of the biggest-ever U.S.-South Korea military drills.

"China insists on realizing the denuclearization of the peninsula ... and is willing to maintain communication and coordination with the American side over the issue on the peninsula," Xi was quoted as saying by state media.

TRUMP WARNS CHINA ON NORTH KOREA: HELP SOLVE THE PROBLEM OR ‘WE WILL’

The call came after Trump warned in a pair of tweets Tuesday that North Korea “is looking for trouble” and vowed to get Kim Jong-Un’s regime under control with or without China’s help.

“I explained to the President of China that a trade deal with the U.S. will be far better for them if they solve the North Korean problem!” Trump tweeted.

He added in a second tweet: “North Korea is looking for trouble. If China decides to help, that would be great. If not, we will solve the problem without them! U.S.A.”

Trump and other U.S. officials have repeatedly called on China to leverage its status as North Korea's biggest economic partner and source of food and fuel aid to force Pyongyang to abandon its nuclear weapons program.

China has said that it is in full compliance with sanctions enacted under U.N. Security Council resolutions and in February, suspending imports of coal from North Korea — a key source of foreign currency for Kim.

However, Beijing also said it will not countenance measures that could bring about a collapse of the regime that could release a flood of refugees across its border, destabilize northeast Asia and result in a U.S.-friendly government taking power in Pyongyang.

North Korea has drawn U.S. ire recently following a series of ballistic missile tests. There is also fear the country’s nuclear program is progressing.

Pyongyang said Monday it would “hold the U.S. wholly accountable for the catastrophic consequences” if there was any further military action after the USS Carl Vinson arrives in the area of the Korean Peninsula.

Adding to tensions, The Wall Street Journal reported Tuesday that activity appeared to be taking place at a North Korean nuclear test site ahead of the April 15 anniversary of the communist country's founding.

Fox News’ Cody Derespina and The Associated Press contributed to this report.

Ryan Gaydos is a news editor for Fox News. Follow him on Twitter @RyanGaydos.