US President Donald Trump has said he was considering a “pretty severe” response to North Korea’s intercontinental ballistic missile test, even as China appealed for a scaling down of rhetoric.

Tuesday’s launch marked a milestone in Pyongyang’s decades-long drive to threaten the US mainland with a nuclear strike, posing a thorny policy challenge for Mr Trump, who is at loggerheads with Beijing over how to handle Kim Jong-un’s regime.

“I call on all nations to confront this global threat and publicly demonstrate to North Korea that there are consequences for their very, very bad behaviour,” Mr Trump said during a visit to Warsaw.

The European Union and Japan joined Washington’s push for tougher sanctions against Pyongyang to put pressure on Kim’s regime.

But Mr Trump has also warned he is ready to use force if necessary.

“I have pretty severe things that we’re thinking about,” Mr Trump said, adding: “That doesn’t mean that we’ll do them.”

Mr Trump has repeatedly urged Pyongyang’s chief backer China to rein the Stalinist state in, taking to Twitter this week to publicly berate Beijing for not squeezing the North hard enough on trade.

China responded with a call for more moderate language from all sides.

“We also call on relevant parties to stay calm, exercise restraint, refrain from words and deeds that may heighten tensions,” foreign ministry spokesman Geng Shuang told reporters.

South Korean President Moon Jae-In, who is attending this week’s G20 summit along with Mr Trump and China’s President Xi Jinping in Hamburg, Germany, insisted his previous offer for talks with Kim was still on the table despite the missile test, saying it was “dangerous” there was “no dialogue whatsoever”.

“When the conditions are met, I am prepared to meet the North Korean ruler wherever and whenever,” he told an audience at a think-tank in Berlin.

China’s Mr Xi said his government was committed to denuclearisation of the Korean Peninsula, but stressed this could best be achieved through dialogue and negotiations, the Xinhua news agency reported.

Mr Trump had dismissed the idea of North Korea having a working ICBM, vowing it “won’t happen”, but experts say the new missile could reach Alaska or even further towards the continental US.

e test prompted the US and its ally South Korea to stage a joint missile drill aimed at countering the North’s threats, after Moon called for a response beyond “just words”.

The test has sent jitters through global stock markets, with Asian and European shares falling on Thursday.

Beijing insists it has made “relentless efforts” to curb Pyongyang’s nuclear ambitions in line with UN economic sanctions.

China decided to stop buying North Korean coal in February and total imports from the North have steadily dropped every month from $207 million in January to $99 million in April.

But official Chinese customs data shows a 37.4 per cent rise in yuan terms in overall trade with North Korea and 30.6 per cent in US dollars in the first quarter.

“Trade between China and North Korea grew almost 40 per cent ... so much for China working with us — but we had to give it a try!” Trump tweeted on Wednesday.

For China, the worst-case scenario is a collapse of the regime in Pyongyang, which could see an influx of refugees from its impoverished neighbour, and worse yet, US troops stationed on its border in a united Korea.