Donald Trump has downplayed recent North Korean missile tests in an apparent contradiction of his national security adviser.

The US president tweeted from Tokyo that the tests are not a concern for him — even though they are for Japan.

Mr Trump also said North Korean leader Kim Jong Un’s attacks on one of his Democratic rivals, former vice president Joe Biden, had made him smile.

The remarks were the latest example of Mr Trump’s willingness to publicly undermine senior advisers, flout democratic norms and side with totalitarian leaders, even on the world stage.

He did so this time during a four-day state visit to Japan where he will become the first leader to meet with the country’s new emperor.

“North Korea fired off some small weapons, which disturbed some of my people, and others, but not me,” Mr Trump tweeted in one of a flurry of early morning messages that suggested he had spent little time sleeping after the lengthy flight to Asia.

“Some” of his “people” appear to include national security adviser John Bolton, who told reporters at a briefing Saturday ahead of Mr Trump’s arrival that a series of short-range missile tests by North Korea earlier this month were a violation of UN Security Council resolutions.

“In terms of violating UN Security Council resolutions, there is no doubt about that,” said Mr Bolton, responding to the May 4 and May 9 tests that ended a pause in launches that began in late 2017.

Mr Trump ignored a shouted question on Sunday about whether he agreed with Mr Bolton’s assessment.

Mr Trump and other administration officials have sought to downplay the significance of the tests, insisting they do not violate an agreement Mr Trump reached with Mr Kim for a moratorium on launches.

“The moratorium was focused, very focused, on intercontinental missile systems, the ones that threaten the United States,” Secretary of State Mike Pompeo said in a recent television interview.

That raised alarm bells in Japan, where short-range missiles pose a serious threat because of the country’s proximity to North Korea.

Mr Trump in his tweet said he had “confidence that Chairman Kim will keep his promise to me,” while at the same time embracing Mr Kim’s recent attacks on Mr Biden, whose name he misspelled.

Mr Trump said he “smiled” when Mr Kim “called Swampman Joe Bidan a low IQ individual, & worse.”

“Perhaps that’s sending me a signal?” Mr Trump asked.

Mr Trump later offered a new tweet with the correct “Biden” spelling.

North Korea this week labelled Mr Biden a “fool of low IQ” and an “imbecile bereft of elementary quality as a human being” after the US presidential hopeful accused Mr Trump of cosying up to “dictators and tyrants” like Mr Kim and Russian president Vladimir Putin during his campaign launch speech.

Mr Biden’s campaign would not comment on the record on Sunday, but a spokesman for his campaign, Andrew Bates said on Wednesday that: “Given Vice President Biden’s record of standing up for American values and interests, it’s no surprise that North Korea would prefer that Donald Trump remain in the White House.”

The tweet came early on Sunday before Mr Trump left his hotel for a round of golf with prime minister Shinzo Abe.

He will also be attending a sumo wrestling match and handing out a President’s Cup to the winner as part of a visit meant to showcase the close ties between the nations.