President Donald Trump’s latest attack on the New York Times wasn’t just a standard illustration of his shamelessness — it was also self-defeating.

On Thursday, Trump lashed out at the publication for demoting deputy Washington editor Jonathan Weisman, tweeting that he “Should have been Fired!”

“Totally biased and inaccurate reporting,” he continued. “The paper is a Fraud, Zero Credibility. Fake News takes another hit, but this time a big one!”

It’s unclear whether Trump even understands why Weisman was demoted. Because if he did, he’d likely disagree with the paper’s punishment of Weisman.

Wow! The Deputy Editor of the Failing New York Times was just demoted. Should have been Fired! Totally biased and inaccurate reporting. The paper is a Fraud, Zero Credibility. Fake News takes another hit, but this time a big one! — Donald J. Trump (@realDonaldTrump) August 15, 2019

Weisman was demoted following a string of racially insensitive tweets, including one posted late last month in which he suggested a group of Democrats including Reps. Rashida Tlaib (MI) and Ilhan Omar (MN) — both women of color, and both regular targets of Trump’s ire — aren’t really from “the Midwest.”

As Rebecca Fishbein wrote for Jezebel, Weisman was widely criticized for suggesting that “only rural white people can be ‘real’ Deep Southerners or Midwesterners.” He later deleted the tweet, explaining that “I tried to make a point about regional differences in politics between urban and rural areas. I deleted the tweets because I realize I did not adequately make my point.”

Marc Tracy of the New York Times reports that Weisman was warned to be more careful on social media following that incident. But last Thursday, he again waded into racially fraught territory, tweeting that “Justice Democrats has backed another primary challenger, this one seeking to unseat an African-American Democrat, Joyce Beatty, who represents Columbus” — seemingly oblivious to the fact that the challenger he was referring to, Morgan Harper, is also black.

When Harper pointed this out to him, Weisman made matters worse by writing, “@justicedems’s endorsement included a photo.”

If all of that isn’t bad enough, Weisman followed it up by demanding an apology from author and New York Times contributor Roxane Gay and her assistant after they criticized his tweets. Gay later posted a screengrab of the email Weisman sent.

He also emailed my assistant. WTF? pic.twitter.com/RJURk2CHvn — roxane gay (@rgay) August 8, 2019

On the heels of those debacles, the Times announced on Tuesday that Weisman “had been demoted and would no longer oversee the paper’s congressional correspondents because he repeatedly posted messages on social media about race and politics that showed what the paper called ‘serious lapses in judgment,” as Tracy reports in his piece.

But what the Times regards as “serious lapses in judgment” worth demoting someone over are not only minor transgressions by Trump’s standards, but in some ways echo his talking point.

Trump should sit out trying to score points on racially insensitive tweets, but the first tenet of Trumpism is to never sit one out

Weisman’s tweet about Tlaib and Omar wasn’t good, but the irony is that Trump has posted ones about them that are just as bad, if not worse. Last month, for instance, he urged the two and two other Democratic congresswomen of color to “go back and help fix the totally broken and crime infested places from which they came.” That tweet was widely read as suggesting the women are somehow less American than others, and therefore don’t have the right to criticize their country. Trump followed that up by briefly basking in “send her back!” chants directed at Omar during one of his rallies.

Trump was still at it on Thursday morning. He posted a tweet mischaracterizing Tlaib and Omar’s criticism of Israel as evidence that they “hate Israel & hate all Jewish people,” and suggested Israel should bar them from visiting the country — something the government of Prime Minister Benjamin Netanyahu promptly did.

Given his repeated insinuations that Tlaib and Omar are somehow less than fully American, it’s hard to imagine Trump would disagree with Weisman’s insinuation that they don’t really represent “the Midwest.” So in his tweet attacking the Times, Trump is expressing anger that the publication didn’t fire a journalist for expressing a viewpoint he basically endorses.

But Trump, of course, is not one to sit out controversies. He’s repeatedly attacked House Speaker Nancy Pelosi and former Vice President Joe Biden for stammering during public appearances, although he regularly has the same difficulty. He’s tried to capitalize on controversy surrounding Bill Clinton’s ties with convicted sex offender Jeffrey Epstein, although he’s on tape partying with Epstein and on record saying that Epstein “likes beautiful women as much as I do, and many of them are on the younger side.”

Trump saw an opportunity on Thursday to attack a publication he perceives as his enemy and went for it. It’s the same sort of decision-making that resulted in him recklessly retweeting a conspiracy theory suggesting the Clintons were involved in Epstein’s death last Saturday (and later defending doing so on extremely flimsy grounds). His seeming lack of shame means he has no qualms about publicly attacking a perceived enemy — even when said attack is self-defeating.

The news moves fast. To stay updated, follow Aaron Rupar on Twitter, and read more of Vox’s policy and politics coverage.