When a possible Hall of Famer tweets about Nazis and ends up in the doghouse with ESPN, he should take heart: Sarah Palin has his back.

In a tweet deleted earlier this week, Boston Red Sox World Series hero Curt Schilling compared Muslims to Adolf Hitler.

“The math is staggering when you get to the true #s,” including a photo of Hitler with the text: “It’s said only 5-10% of Muslims are extremists. In 1940, only 7% of Germans were Nazis. How’d that go?”

When pitchers-turned-ESPN analysts wax poetic about Nazis on social media, it often doesn’t end well. Schilling was suspended — albeit just from covering the Little League World Series — for the remark.

“Curt’s tweet was completely unacceptable, and in no way represents our company’s perspective,” ESPN said. “We made that point very strongly to Curt and have removed him from his current Little League assignment pending further consideration.”

Schilling himself was repentant.

“I understand and accept my suspension,” he tweeted on Tuesday. “100% my fault. Bad choices have bad consequences and this was a bad decision in every way on my part.”

But, apropos of nothing and at least one news cycle too late, Palin sprang to Schilling’s defense early Friday.

“ESPN IS A JOURNALISTIC EMBARRASSMENT,” Palin wrote on Facebook. “ESPN – what happened to you? Your intolerant PC police are running amok and making a joke out of you!”

But, in a lengthy post, Palin went on — and on and on and on. After recounting the details of Schilling’s suspension, she said she wanted to make two points.

“One — there’s been crude, rude bile spewing from the once-great sports network for years now,” she wrote. “Trust me. I know. My name and reputation’s been in it.”

Palin then referred to an incident in 2011 in which Mike Tyson, in an interview with an ESPN affiliate in Las Vegas, made graphic comments about interracial sex and the former Alaska governor, joking about her reported relationship with NBA star Glen Rice.

Tyson’s comments were largely unprintable. One example: “If you’re a black man, every white girl, every uppity middle class … everybody got to get their share of love.”

Palin wasn’t a fan.

“One ESPN affiliate’s on-air rant featuring their misogynist, animalistic ‘analysts’ grunting and giggling through an entire x-rated celebration of violence against women didn’t even draw a chirp from ESPN’s wussified leaders,” she wrote in her Thursday post. “Look it up; I don’t want to have to recount it.”

Then, Palin turned to the matter at hand: Didn’t Schilling have a point?

“Was he wrong?” she wrote. “No! In fact his stats were too generous in estimating Muslims’ attitudes. Reports show it’s 88% of Egyptian Muslims favoring DEATH for anyone who leaves Islam. The majority of Muslims in many other places share the sentiment. In America, these views could be correctly described as ‘extreme.’”

She added: “The difference between Hitler’s army and the genocidal maniacs of ISIS is that the jihadists don’t have as much power … yet.”

Palin said, by disaffiliating itself, albeit temporarily, with Schilling, ESPN had affiliated itself with the Islamic State.

“By denying the accuracy of Schilling’s tweet, ESPN shows its weakness as it buys into the propaganda of ISIS and other terror organizations, helping mislead the public about the very real threat of terrorism,” she wrote.

Her advice: “Stick to sports.”

It should be noted that Schilling and Palin are fellow travelers after a fashion. A conservative who once contemplated running for the Senate, Schilling has said his politics have kept him out of the Hall of Fame.

“I know that as a Republican that there’s some people that really don’t like that,” he said earlier this year.