Not long after Christine Blasey Ford, a clinical psychology professor, accused Supreme Court nominee Brett M. Kavanaugh of sexually assaulting her when the two were teenagers, it became pretty clear that President Trump was siding with Kavanaugh.

“This is not a man who deserves this,” Trump told the media last week.

A day later, the president expounded upon why he has such a hard time believing Ford’s claims that a drunken Kavanaugh “pinned her to a bed on her back and groped her over her clothes, grinding his body against hers and clumsily attempting to pull off her one-piece bathing suit and the clothing she wore over it,” as The Washington Post reported.

“I can only say this: He is such an outstanding man. Very hard for me to imagine that anything happened,” Trump told reporters.

“Good Morning America” anchor George Stephanopoulos told White House press secretary Sarah Huckabee Sanders on Tuesday that the president doesn’t have a history of believing women when sharing their stories, noting what he called a “pattern here.”

“When Roy Moore is accused, when Bill O’Reilly is accused, when Roger Ailes is accused, when Rob Porter is accused and now when Brett Kavanaugh is accused, the president consistently, every single time, takes the side of the man,” Stephanopoulos said.

Sanders called Stephanopoulos’s comments “interesting” and accused Democrats of ignoring women when their own party members, such as Rep. Keith Ellison (D.-Minn.) and Sen. Cory Booker (D.-N.J.), face allegations of misconduct toward women.

“They love to fight and champion women until they disagree with them,” she said.

Stephanopoulos pushed back, arguing that former Democratic senator Al Franken lost his job when women accused him of sexual harassment and assault, before restating his point.

Sanders was right. Trump doesn’t always side with men. He just tends to side with men if they are political allies.

When Republicans face allegations of sexual misconduct, Trump tends to believe the best — even when his position is the least popular one, which was the case with Moore, the Senate candidate from Alabama accused of pursuing multiple women when they were teenagers and sexually assaulting or groping three of them.

“Look, he denies it,” said Trump, who endorsed Moore. “He says it didn’t happen. And you know, you have to listen to him also.”

And when reports that Fox News had paid millions in settlement money to multiple women alleging that O’Reilly, a favorite former anchor of conservatives, had sexually harassed company employees, Trump defended the character of his friend.

Trump often defends his friends against allegations of sexual harassment or sexual misconduct by vouching for them personally.

“I think he’s a person I know well,” Trump said of O’Reilly. “He’s a good person.”

And when at least two dozen women accused Ailes, the former Fox News CEO, of sexual harassment, the president said:

“It’s very sad because he’s a very good person. I’ve always found him to be just a very, very good person. And, by the way, a very, very talented person. Look what he’s done. So I feel very badly.”

But Trump doesn’t tend to feel as badly when the men being accused are political rivals of the president.

Franken regularly criticized the Trump administration before he faced allegations late last year that he had groped numerous women. After these reports, including some photos, went public, Trump made it clear whose side he believed despite Franken’s denials. Franken resigned in January.

And during the 2016 presidential election campaign, Trump made it clear that he believed the allegations leveled against former president Bill Clinton by multiple women, and went so far as to hold a news conference with Clinton’s accusers before a debate against 2016 Democratic nominee Hillary Clinton.

When news of sexual harassment allegations by prominent Democratic donor and Hollywood producer Harvey Weinstein first made headlines, it did not take long for Trump to express his belief in the stories.

He told reporters: “I’ve known Harvey Weinstein for a long time. I’m not at all surprised to see it.”

Even before he entered the White House, he attacked Democrats facing sex scandals such as former New York governor Eliot Spitzer, who resigned from office after reports that he patronized an escort service, and former New York congressman Anthony Weiner, who was sentenced to 21 months in prison after sexting with a minor.

Trump, who has denied more than a dozen sexual assault and harassment allegations lobbed at him, has proved that he is capable of “imagining” that victims alleging assault and harassment could be telling the truth. What Trump has not displayed is an ability to imagine that allegations against those in his own political tribe could be true.