So far, President Donald Trump has defended or sympathized with Michael Flynn — his short-lived national security adviser, who was brought down earlier in December by Robert Mueller’s Russia investigation.

But now, worried over the songs he might be singing to the special counsel, Trump and his legal team are preparing to launch an attack on Flynn’s credibility, the Washington Post reported Wednesday — a shift on one of the president’s strongest allies, who was once considered a strong contender to be his running mate.

Flynn, who confirmed he is cooperating with investigators as part of a plea deal, admitted Dec. 1 that he lied to FBI agents about his contacts with then-Russian ambassador Sergey Kislyak in 2016 — and that Jared Kushner and other high-ranking members of the Trump transition team were aware of the conversations.

According to the Post, Trump’s lawyers plan to undercut any damaging claims by Flynn by dismissing the retired general — whom the president described in February as a “wonderful man” — as untrustworthy.

“He’s said it himself,” a person who helped develop the new strategy on Flynn told the Post. “He’s a liar.”

When the going gets rough, Trump gets going

President Donald Trump waves to journalists as he leaves the White House Dec. 22. Chip Somodevilla/Getty Images

It shouldn’t be surprising that Trump is running away from Flynn.

It’s part of a familiar pattern for the president, who is quick to turn on or distance himself from his allies when it proves convenient to do so.

Flynn is the fourth member of the Trump team known to have been taken down by Mueller so far.

Paul Manafort, his former campaign manager, and his associate, Rick Gates, were indicted Oct. 30.

Manafort had once been a “respected man” in the eyes of Trump.

But as the former campaign chairman faced months of intense scrutiny from Mueller, Trump and the White House significantly downplayed the role he played in getting him the presidency.

Then-press secretary Sean Spicer said in March that Manafort had “played a very limited role for a very limited amount of time” in the campaign. Trump said in August that though he believed Manafort was a “decent man,” he was only with the campaign “for a very short period of time.”

The day of Manafort’s indictment, Mueller unsealed a plea deal that had been struck by George Papadopoulos — a former foreign policy adviser to the Trump campaign.

The White House claimed that he’d played an “extremely limited” volunteer role on the campaign. Trump belittled him as a “young, low level volunteer named George, who has already proven to be a liar.”

He’s employed the strategy in other situations, as well — most notably, perhaps, after he went all in on a trifecta of failed candidates in proxy races.

Trump in September backed Sen. Luther Strange (R-Ala.) in the Republican primary for attorney general Jeff Sessions’ former Senate seat — but quickly deleted tweets after extreme ex-judge Roy Moore defeated him.

Then, in November, he vocally supported Ed Gillespie in the Virginia gubernatorial race, but distanced himself after Democrat Ralph Northam beat him in what was widely seen as a referendum on the president.

“Ed Gillespie worked hard but did not embrace me or what I stand for,” Trump tweeted after the loss.

He finally turned his sights back to Alabama, where he bucked his own party to support Moore — even after credible allegations of child molestation surfaced. Moore lost — yes, lost — to Doug Jones in a December upset, sending a Democrat to represent Alabama in Washington for the first time in a quarter century, and the president quickly tried to revise his role in trying to boost the controversial Republican.

“I said Roy Moore will not be able to win the general election,” Trump tweeted earlier this month. “I was right!”

While his attempts to distance himself from failed candidates seem designed to protect his image, his attempts to distance himself from allies caught up in the Russia probe seem much more about self-preservation.

Flynn has already seemingly implicated other high ranking Trump officials in his shady Kislyak conversations, and said in a statement in December that he is cooperating with Mueller “in the best interests of my family and of our country.”

That he was only charged with lying to the FBI suggests he may have promised Mueller some whoppers — possibly about people higher on the food chain in the Trump ecosystem.

The move to try to undermine Flynn’s credibility is a predictable and understandable one by Trump’s lawyers, legal experts told the Post.

But it does come off differently than the previous attempts to do the same against Manafort, Gates and Papadopoulos.

Trump’s affection for Flynn seemed to transcend their work together on the campaign.

He reportedly felt “bad” about forcing Flynn out of the administration in February over his Kislyak contacts and apparently needed to be told multiple times by White House lawyers not to contact the retired general, whom he publicly expressed support for throughout the year.

As the president and his allies have upped their attacks on Mueller in recent weeks, he suggested that he may be open to pardoning Flynn.

“Let’s see,” Trump told reporters Dec. 15.

Joseph Flynn, the retired general’s brother, called on the president Tuesday to pardon the former national security adviser.