Three weeks into his presidency Donald Trump has given numerous indications that he wants to put domestic issues first in his effort to “Make America Great Again”. The security of the United States’ borders, the protection of its workers and a conservative vision of its culture have all been the subject of executive orders and presidential pronouncements. Little has been achieved without controversy.

Most worryingly, his desire for action has already come at the expense of both procedural rigour and the kind of statesmanlike reflection which might have been hoped for in a holder of such high office. The fallout from his attempt to impose a travel ban to the US from seven predominantly Muslim countries has offered a disturbing glimpse of how little regard Mr Trump has for the accepted norms of government.

Yet however much President Trump may prefer to focus on America’s internal affairs, it was only a matter of time before his approach to pressing global concerns faced a severe challenge. Following the trial firing of a ballistic missile by North Korea this weekend, the moment may have come. Indeed, for all the talk about defeating Isis, rewriting US policy towards the Middle East and potential changes to America’s relationship with Nato, perhaps it is no real surprise that it is Kim Jong-un who has provided the first major test of Mr Trump’s diplomatic mettle. There is no more unpredictable nation in the world than North Korea, which makes President Trump’s response to its latest posturing all the more significant.

The firing of the missile was timed to coincide with a visit to the US by the Japanese Prime Minister, Shinzo Abe, who declared the test – which sent an intermediate-range projectile 300 miles towards the Sea of Japan – to be “absolutely intolerable”. His presidential host, meanwhile, spoke of the importance of America’s “great” alliance with Japan, behind whom the US would stand “100 per cent”.

Previously, in a joint statement published on Friday, the two men had spoken of the need for North Korea to abandon its nuclear and ballistic missile programmes. Mr Trump’s pick as Defence Secretary, Jim Mattis, travelled to South Korea last week on his first official visit outside the US and indicated that any use by Pyongyang of nuclear weapons would be met with an “effective and overwhelming” response.

Such tough language may be emblematic of Mr Trump’s own style but it is not very different from the words previous US administrations might have offered. Nonetheless, the strategic situation has changed in important ways. First, North Korea’s offensive capabilities have continued to expand – for every year of failed diplomacy and ineffective sanctions, the threat it poses beyond its borders has become more substantial. Second, Mr Trump has yet to establish any sort of working relationship with China. And it is ultimately Washington’s relationship with Beijing that holds the key to determining whether Kim Jong-un’s ambitions, difficult though they are to read, can be contained.

Thus far, Mr Trump has suggested a degree of ambivalence towards the need to build an alliance with China. He has regularly cited Chinese economic advancement as having undermined American industry and he has criticised China’s military build-up in the South China Sea. His decision to take a phone call from the Taiwanese President shortly after winning November’s election was unwise, to say the least. On Friday it was revealed that he had finally reaffirmed America’s longstanding One China policy in a telephone conversation with Chinese President Xi Jinping; yet questions have been raised about why it took so long for Mr Trump to call his counterpart in Beijing. Certainly, his warm meeting with Shinzo Abe provokes a stark contrast.

The greatest danger in respect of North Korea is that its real or imagined threat leads to unilateral action either by America or by one of its allies, South Korea or Japan. The reaction that in turn might provoke from China can only be guessed at. For Mr Trump, then, the challenge posed by Pyongyang is not to his authority but to his ability to stay calm.