TOKYO (AP) — All the pomp and pageantry in the world couldn't paper over the tensions between President Donald Trump and Japan's Shinzo Abe on two of their most pressing issues: North Korea and trade.

The president and prime minister tried mightily to minimize their differences during Trump's four-day state visit to Tokyo, while playing up their close personal friendship and their countries' long-held ties. But tension abounded, with Trump on Monday brushing off the significance of North Korean short-range missile tests that have rattled Japan and reasserting his threats to hit Abe with potentially devastating auto import tariffs.

Asked if he was bothered by the missile tests, Trump said: "No, I'm not. I am personally not." Abe, in contrast, said the missile tests were "of great regret."

The conflict demonstrates the limits of Abe's long-term strategy of showering Trump with affection in hopes of extracting benefits. Trump appeared uninterested in concessions despite a program tailor-made for the president that included a showy visit with the new Japanese emperor, a round of golf and prime seats at a sumo tournament where Trump got to present a "President's Cup" to the winner,

Trump also demonstrated again that he is willing turn his back on long-held norms as he assailed Joe Biden, the 2020 Democratic hopeful whom North Korean leader Kim Jon Un recently criticized as having a low IQ.

"I don't take sides as to who I'm in favor or who I'm not," Trump said when asked whether he was favoring a violent dictator over the former vice president. "But I can tell you that Joe Biden was a disaster."

Indeed, Trump also sided with Kim on the question of whether the short-term missile launches violated U.N. Security Council resolutions, as both Abe and Trump's own national security adviser, John Bolton, had stated.

"My people think it could have been a violation," said Trump. "I view it differently. I view it as a man — perhaps he wants to get attention and perhaps not. Who knows?"

Japan has long voiced concern about short-range missiles because of the threat they pose to its security. Kim's decision to lift the pause in ballistic missile launches that began in late 2017 alarmed North Korea's neighbors.

Most analysts believe the missiles were ballistic missiles, which are not allowed under U.N. resolutions.

Trump's visit to Japan was designed to highlight the U.S.-Japan alliance and showcase the warm relations between the two leaders. Trump said he and Abe deliberated over trade, Iran and more during hours of talks at Akasaka Palace.

Trump was invited to Japan to be the first world leader to meet the country's new emperor. But despite being far from Washington, Trump didn't hold back in his criticism of Biden, telling the world he agreed with the North Korean leader's assessment and declaring himself "not a fan."

"Kim Jong Un made a statement that Joe Biden is a low-IQ individual," Trump said. "He probably is, based on his record. I think I agree with him on that."

Pressed on whether he was supporting a dictator over a former U.S. vice president, Trump recited a host of complaints about the Obama-Biden administration.

U.S. officeholders have in the past generally avoided engaging in politics while on foreign soil, hewing to the adage that politics stops at the water's edge. But Trump's sharp attack on Biden, through his declaration of agreement with Kim, cast aside that tradition.

Biden, during a recent campaign event, accused Trump of cozying up to "dictators and tyrants" like Kim.

Trump continues to hold out hope of getting Kim to agree to give up his nuclear weapons and ballistic missiles, even though the two summits he's had with the North Korean leader have produced no concrete pledge to denuclearize the Korean peninsula.

Trump nonetheless praised Kim, calling him a "smart man" who was intent on making his country better.

"All I know is there have been no nuclear tests, no ballistic missiles going out, no long-range missiles going out, and I think that someday we'll have a deal," Trump said, adding that he is in "no rush."

Trump is correct that North Korea has not recently tested a long-range missile that could reach the U.S. But this month, North Korea fired off a series of short-range missiles.

"This is violating the Security Council resolution," Abe said, adding that, as North Korea's neighbor, Japan feels threatened. "It is of great regret."

Still, Trump and Abe pledged to work closer together as they attend to North Korea and move forward with trade talks.

Earlier Monday, Trump said he backed Abe's interest in leveraging his country's good relations with Iran to help broker a possible dialogue between the U.S. and its nemesis in the Middle East. Abe said he is willing to do whatever he can to help to reduce tensions between the U.S. and Iran.

"Peace and stability of (the) Middle East is very important for Japan and the United States and also for the international community as a whole," Abe said.

Abe could visit Iran next month.

Trump also said his only aim is to prevent the country from obtaining nuclear weapons.

"We're not looking for regime change," he said. "I just want to make that clear. We're looking for no nuclear weapons."

Trump and Abe held hours of talks Monday after Trump became the first world leader to meet Japan's new emperor, Naruhito, who ascended to the throne May 1.

Trump's meeting with the new emperor and his wife, Empress Masako, was preceded by a grand outdoor welcome ceremony at Japan's Imperial Palace, where Trump walked solo across red carpets, reviewing Japanese troops as the guest of honor.

Trump's official visit also made time for golf with Abe, presentation of a trophy he created to a sumo wrestling champion and a black-tie banquet at the palace — as well as hours of one-on-one time with Abe, who has been trying to remain on Trump's good side, especially on trade.

Trump and Abe largely glossed over their differences, despite the auto tariffs that Trump is threatening to impose on Japan and the European Union. Trump declined to say what Japan would have to do to avoid those tariffs but complained of an "unbelievably large" trade imbalance with the nation.

Still, he said he expects to reach trade deals with Japan and China "sometime into the future."

Trump and Chinese President Xi Jinping are expected to meet during a world leaders' summit next month in Osaka.