U.S. President Donald Trump accused China of non-cooperation in dealing with the North Korean nuclear threat, and threatened retaliatory trade measures against Beijing as he left for Europe on Wednesday morning. The President has been pressing China to rein in the North Korean regime to roll back its nuclear and missile programmes and had offered a “better trade deal” in return.

Mr. Trump is scheduled to meet Chinese President Xi Jinping in Hamburg, Germany, on the sidelines of the G-20 summit. Mr. Trump will also meet Russian President Vladimir Putin in Hamburg.

“Trade between China and North Korea grew almost 40% in the first quarter. So much for China working with us — but we had to give it a try!,” Mr. Trump posted on Twitter, referring to his efforts to draft Beijing to deal with the crisis, and signalling that he was now giving up.

Testing of an inter-continental ballistic missile (ICBM) that could reach the U.S. west coast by North Korea on Tuesday has increased the urgency of the threat. “…Perhaps China will put a heavy move on North Korea and end this nonsense once and for all!” the President had tweeted after the test.

In another post on Wednesday that indicated he is considering a trade confrontation with China, Mr. Trump said: “The United States made some of the worst Trade Deals in world history. Why should we continue these deals with countries that do not help us?” As he left the White House for the airport a little later, he responded to shouted questions from reporters, about North Korea: “We’re going to do very well.”

The Twitter strike could be partly a negotiating tactic to increase pressure on the Chinese leader ahead of their face-to-face meeting, but Mr. Trump has overruled most of his cabinet colleagues to proceed with trade tariffs against China, which might be unveiled within weeks, according to recent U.S. media reports.

Sourabh Gupta, Resident Fellow at the Institute for China America Studies in Washington, said Mr. Trump personally might have an exaggerated understanding of Beijing’s ability to control Pyongyang, but his advisers are more realistic. “Assuming that Beijing actually wants to do it, their ability to control North Korean behaviour is extremely limited. They don’t even have direct access to Kim Jong-un. In fact, the timing of the ICBM test, ahead of the G-20 meet is Kim’s way of saying that his fate cannot be negotiated by others,” he said.

The U.S has called an emergency meeting of the UN Security Council on Wednesday. Mr. Gupta said the ICBM test is a loss of face for Mr. Xi and China might consider measures such as embargo on oil trade that it has not done so far.

Mr. Trump and Mr. Xi had set a 100-day deadline to deal with the complex trade disputes between the two countries and it ends on July 16. At $347 billion, trade deficit with China constitutes three fourths of the total and bringing it down has been a priority of the Trump administration. In the hope of making a grand bargain with China on trade and North Korea, the Trump administration had held back on freedom of navigation exercises in the South China Sea in the initial months but restarted them in the last week of May.

Anonymous White House officials have told American news outlets that the warm welcome accorded to Prime Minister Narendra Modi was also a signal to China. The administration has also announced an arms sale of $ 1.42 billion to Taiwan, which China had warned against.

U.S. officials have said “strategic patience is over” with regard to North Korea, but have not spelt out what it entails. Freshly elected South Korean President Moon Jae-in, who was in Washington last week, is in favour of exploring diplomatic options, and the U.S. will have to have him on board for any move against North Korea though the Trump administration has said it is open to taking unilateral measures.

Chances of a diplomatic engagement with Pyongyang are open, with China, Russia, Japan and South Korea closely involved in the issue, said Mr. Gupta. “Any format, involving some or all of them is possible, and the Trump administration has not ruled it out yet,” he said.

U.S. Secretary of State Rex Tillerson and Secretary of Defense Jim Mattis hosted Chinese State Councilor Yang Jiechi and General Fang Fenghui, Chief of the People’s Liberation Army’s Joint Staff Department, in June for the inaugural U.S.-China Diplomatic and Security Dialogue (D&SD) on June 21, 2017 in Washington, where North Korea dominated the discussions. Japanese Prime Minister Shinzo Abe and Moon Jae-in will also be in Hamburg, where North Korean issue will loom large.