President Donald Trump seems to have a new ally in his 2020 reelection fight: North Korean leader Kim Jong Un. More shocking, though, is that Trump appears fine with it — and is siding with the brutal dictator over a fellow American.

Last week, the state-run Korean Central News Agency published a scathing article targeting top Democratic presidential contender Joe Biden. Among other insults, the commentary called the former vice president “a fool of low IQ” and listed off a series of embarrassing moments in his life — like the time Biden fell asleep during a 2011 speech by then-President Barack Obama, or how in 1987 he admitted to plagiarizing in school.

Trump seemed delighted by the KCNA hit piece, tweeting Sunday that he had “confidence” Kim had “smiled when he called Swampman Joe Biden a low IQ individual, & worse.”

And asked about his tweet during a press conference alongside Japanese Prime Minister Abe Shinzo* the next day, Trump reiterated his stance. “Kim Jong Un made a statement that Joe Biden is a low-IQ individual. He probably is, based on his record. I think I agree with him on that,” the president told reporters.

Just stop for a second and think about that: The president of the United States endorsed a foreign government’s nasty insults of America’s former vice president — and did so while standing next to the leader of a top American ally.

That’s appalling behavior from the president. There’s an unwritten rule that Americans — and especially high-level American politicians — are supposed to leave domestic politics at the water’s edge when they travel abroad. That means you don’t talk badly about your political opponents overseas, but instead show a united front as a representative of the United States.

Not only did Trump violate that very basic principle, he did so gleefully — and sided with a murderous, repressive dictator while he was at it.

Even some of Trump’s allies in Congress, like Rep. Pete King (R-NY), were appalled by Trump’s behavior.

Wrong for @POTUS Trump to criticize @JoeBiden in Japan and to agree with Kim Jong-un. Politics stops at water’s edge. Never right to side with murderous dictator vs. fellow American. — Rep. Pete King (@RepPeteKing) May 27, 2019

Some experts, however, aren’t too shocked by Trump’s remarks. “This is Trump being Trump, using anything he can to strike his political enemies,” Harry Kazianis, a North Korea expert at the Center for the National Interest in Washington, told me.

Still, it shows that Trump has a penchant for siding with dictators when it most suits him — even at the expense of Americans and US allies.

Trump breaks with Bolton and Abe on North Korea’s missile tests

Trump didn’t just side with Kim when it comes to making fun of Biden — he also took Kim’s side on a much more serious issue: missile testing.

Earlier this month, North Korea conducted two tests of short-range ballistic missiles, ending an 18-month break in provocations. Many analysts viewed the tests as (literal) warning shots to Trump that Pyongyang is very, very unhappy that months of nuclear talks have produced few tangible results.

The two tests prompted Trump’s National Security Adviser John Bolton to tell reporters in Tokyo on Saturday that there was “no doubt” North Korea violated United Nations resolutions barring such launches, effectively making the case that they were a severe provocation.

But Trump, who has spent months trying to strike a nuclear deal with Kim, brushed those concerns aside.

“My people think it could have been a violation, as you know. I view it differently,” Trump said, with Bolton sitting only a few feet away during the joint press conference with Abe. “There have been no ballistic missiles going out,” he continued, going against even the Pentagon’s assessment. “There have been no long-range missiles going out. And I think that someday we’ll have a deal. I’m not in a rush.”

The Japanese prime minister had a different take, though. “North Korea launched a short-range ballistic missile. This is violating the Security Council resolution,” Abe said. “So my reaction is, as I said earlier on, it is of great regret,” he continued, making sure still to give credit to Trump for engaging diplomatically with Kim.

That moment was, to put it mildly, troubling.

Japan, a staunch US ally, is the country that is among the most directly threatened by North Korea’s growing nuclear and missile programs. North Korea views Japan, its former colonizer, as a mortal enemy, and many of the missiles the country tests land near — or even fly directly over — Japan (although the last two tests didn’t threaten Japan at all).

At a time like this, the US president would normally stand firmly alongside the Japanese prime minister and state unequivocally that North Korea should stop conducting tests of weapons that could kill thousands of Japanese people. Instead, Trump’s avid desire for a deal with Kim led to a massive break in Washington and Tokyo’s position on a top national security issue for both capitals.

Put together, Monday’s press conference was an unmitigated disaster for Trump. It would be an extraordinary event if it weren’t already so ordinary.

Trump’s Japan comments were Helsinki-esque

In July 2018, Trump stood alongside Russian President Vladimir Putin in Helsinki and made shocking comments: telling the world he bought Putin’s claim that Moscow didn’t interfere in the 2016 presidential election — even though US intelligence agencies clearly assessed it did.

“I have great confidence in my intelligence people, but I will tell you that President Putin was extremely strong and powerful in his denial today,” Trump said during a press conference with the Russian leader.

While Trump’s performance in Tokyo on Monday wasn’t as bombastic, he still substantively did the same thing as in Helsinki: agreed with a dictator at the expense of Americans.

It’s now an established pattern for the American president: It’s more likely that he will say things that most make him look good — regardless of whom it might make look bad. If you think that’s not a trait an American president should have, it’s because it’s not.

*Editor’s note: Vox’s style guidelines on the Japanese prime minister’s name have changed to better reflect Japanese naming conventions. From now on, the prime minister’s name will be written as “Abe Shinzo,” not “Shinzo Abe.”