(Peter Stevenson/The Washington Post)

President Trump’s relationship with the hosts of the MSNBC program “Morning Joe” — which devolved into cringeworthy tweets about facelifts and the size of the president’s anatomy on Thursday — has a long and ugly history, careening from collegiality to hostility, followed by even deeper hostility.

In the earliest days of the 2016 presidential campaign, Trump was a semiregular guest on the show, hosted by Joe Scarborough and Mika Brzezinski. He seemed to accord it near-equal status to its direct and higher-rated cable-news competitor, “Fox & Friends.”

The three of them appeared to be on friendly terms: Trump thanked Scarborough and Brzezinski for being “believers” in, if not outright supporters of, his candidacy after he won the New Hampshire Republican primary last year. Scarborough, a former Republican Florida congressman, seemed to enjoy a particular rapport with Trump, addressing him by his first name on the air.

But that seemed to change last year when Scarborough dared to criticize Trump on the air and in print.

In an op-ed for The Washington Post in May last year, Scarborough questioned whether Trump’s campaign had what it took to win: “Unless the Trump team figures out how to build a campaign operation that focuses more on fundamentals than flashy PR tricks, the next deal Donald Trump will be negotiating will be his return to The Apprentice,” he wrote.

Trump responded as he often does when criticized, hitting back harder.

He called Scarborough’s show “rapidly fading” in one tweet, and in another remarked, “Wow, I hear @MorningJoe has gone really hostile ever since I said I won’t do or watch the show anymore. They misrepresent my positions!”

This prompted Scarborough to respond that his show was generating “our best ratings ever” and to taunt, “Define ‘rapidly fading,’ Donnie boy!

Last August, their feud moved from nasty to nuclear.

After the “Morning Joe” hosts criticized Trump’s immigration proposals, Trump called the show “unwatchable” in a tweet, adding “@morningmika is off the wall, a neurotic and not very bright mess!”

Scarborough, who is engaged to Brzezinski, came to her aid in, of all things, a music video. Backed by a country-music beat, he sang and semi-rapped about “a soft and flaccid man” who was liable to grant amnesty to undocumented aliens despite his campaign promises to the contrary. The song went on to suggest that Trump suffered from “psychiatric abnormalities” and was “a sociopath [and] a psychopath.”

The reasons for Trump’s latest pique at Scarborough and Brzezinski aren’t clear, but in recent months Scarborough and Brzezinski have called Trump “a jackass” and repeatedly questioned his mental health. Last week, Scarborough released another music video, this one to promote his new rock album. It features images of Trump amid scenes of nuclear war, drug use and riots.

Trump on Thursday was more than happy to respond in kind.

In one of his usual early-morning tweet storms, Trump said, “I hear poorly rated @Morning_Joe speaks badly of me (don’t watch anymore). Then how come low I.Q. Crazy Mika, along with Psycho Joe, came . . . to Mar-a-Lago 3 nights in a row around New Year’s Eve and insisted on joining me. She was bleeding badly from a face-lift. I said no!”

It’s unclear what exactly set Trump off Thursday morning. But the hosts had discussed a Washington Post story about a fake Time magazine cover of him that has hung in several of his golf clubs.

“Nothing makes a man feel better than making a fake cover of a magazine about himself, lying every day and destroying the country,” Brzezinski said. “It’s a good feeling.”

The tweet was the first known instance of a president of the United States commenting on a woman’s supposed facelift. Brzezinski replied a few minutes later on Twitter with a photo of a box of Cheerios that carried the slogan, “Made for Little Hands” — a reference to the president’s supposed anatomical deficits.

MSNBC sought to capture some of the high ground, if any is left, by releasing a statement tacitly defending Brzezinski: “It’s a sad day for America when the president spends his time bullying, lying and spewing petty personal attacks instead of doing his job.”