China’s state news agency has blasted Donald Trump for his “emotional venting” on social media after the President complained on Twitter that China is not helping the US rein in North Korea’s nuclear weapons programme.

“Trump is quite a personality, and he likes to tweet,” said Xinhua, China’s official news agency, in an editorial displayed on Chinese news websites. “But emotional venting cannot become a guiding policy for solving the nuclear issue on the peninsula,” it said, referring to the divided Korean Peninsula.

“I am very disappointed in China,” Mr Trump declared on Twitter on Sunday, after North Korea tested an intercontinental ballistic missile in defiance of United Nations sanctions.

“Our foolish past leaders have allowed them to make hundreds of billions of dollars a year in trade, yet they do NOTHING for us with North Korea, just talk,” Mr Trump wrote. “We will no longer allow this to continue. China could easily solve this problem!”

Xinhua wrote in its 1,000 Chinese-character editorial that Mr Trump “is clearly finding the wrong target” for his outrage.

“What the peninsula needs is immediately stamping out the fire, not adding kindling or, even worse, pouring oil on the flames,” Xinhua said, according to The New York Times. The tensions could, it added, “evolve into a localized conflict, or even the outbreak of war, with unthinkable repercussions.”

Donald Trump's international Presidential trips Show all 22 1 /22 Donald Trump's international Presidential trips Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump AFP/Getty Images Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump talk as they leave the Army Museum at Les Invalides in Paris AFP/Getty Images Donald Trump's international Presidential trips German Chancellor Angela Merkel and US President Donald Trump arrive for the group photo at the G7 Taormina summit on the island of Sicily in May 2017 Getty Images Donald Trump's international Presidential trips Mr Trump was pressed on the subject at the G7 summit in Italy Getty Donald Trump's international Presidential trips US President Donald Trump gives a speeech at the Warsaw Uprising Monument on Krasinski Square Getty Donald Trump's international Presidential trips US President Donald Trump and Britain's Prime Minister Theresa May during a ceremony at the NATO headquarters before the start of a summit in Brussels, Belgium Reuters Donald Trump's international Presidential trips Montenegro's Prime Minister Dusko Markovic is seen to the right of Donald Trump at a Nato summit in Brussels REUTERS Donald Trump's international Presidential trips Pope Francis meeting with US President Donald J. Trump EPA Donald Trump's international Presidential trips Pope Francis poses with US President Donald Trump and First Lady Melania Trump AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump arrives at Palazzo del Quirinale ahead of the meeting with Italian President Sergio Mattarella Ufficio Stampa Presidenza della via Getty Donald Trump's international Presidential trips US President Donald Trump is seen during a joint press conference with the Palestinian leader at the presidential palace in the West Bank city of Bethlehem AFP/Getty Images Donald Trump's international Presidential trips Palestinian president Mahmoud Abbas meets US President Donald Trump PPO via Getty Donald Trump's international Presidential trips Israeli Prime Minister Benjamin Netanyahu speaks with US President Donald Trump prior to the President's departure GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump and Israel's Prime Minister Benjamin Netanyahu shake hands after delivering a speech at the Israel Museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and First Lady Melania Trump lay a wreath in the Hall of Remembrance as White House senior advisor Jared Kushner and Ivanka Trump watch on during a visit to the Yad Vashem Holocaust Memorial museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump visit to Yad Vashem Holocaust museum in Jerusalem accompanied by Prime Minister Benjamin Netanyahu GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump takes his seat before his speech to the Arab Islamic American Summit in Riyadh in Saudi Arabia Reuters Donald Trump's international Presidential trips Saudi Arabia's King Salman bin Abdulaziz al-Saud, US President Donald Trump and US First Lady Melania Trump look at a display of Saudi modern art at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and Saudi Arabia's King Salman bin Abdulaziz al-Saud take part in a signing ceremony at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips King Salman presents Donald Trump with The Collar of Abdulaziz al-Saud Medal at the Royal Court Palace on 20 May AP Donald Trump's international Presidential trips US President Donald Trump is welcomed by Saudi King Salman bin Abdulaziz al-Saud upon arrival at King Khalid International Airport in Riyadh AFP/Getty Images Donald Trump's international Presidential trips U.S. President Donald Trump and first lady Melania Trump walk on the South Lawn prior to their first foreign trip Getty Images

China wants both balanced trade with the United States and lasting peace on the Korean peninsula, Xinhua said. China's large surplus with the US was $347bn in 2016.

“However, to realize these goals, Beijing needs a more cooperative partner in the White House, not one who piles blame on China for the United States' failures.”

Chinese diplomats and the state news media have asserted that the US and its allies should not depend so much on China to ease tensions created by North Korea’s growing nuclear weapons programme and missile capabilities. On Friday, North Korea tested a ballistic missile that experts have said could have the range to reach the West Coast.

In a statement after the launch, US Secretary of State Rex Tillerson said that “China and Russia bear unique and special responsibility” for North Korea’s “growing threat to regional and global stability.

Russia said on Monday that the US and other countries were trying to shift responsibility for the situation to Russia and China, “almost blaming Moscow and Beijing for indulging the missile and nuclear ambitions of the DPRK (North Korea).”

China's Foreign Ministry, in a statement sent to Reuters responding to Trump's tweets on Sunday, said the North Korean nuclear issue did not arise because of China and that everyone needed to work together to seek a resolution.

China's ambassador to the UN said on Monday it is primarily up to the US and North Korea, not China, to reduce tensions and work toward resuming talks to end Pyongyang's nuclear weapon and missile programmes.