Comedian Russell Brand thinks he’s cracked the code.

Brand, the bawdy Brit behind movie flops like “Rock of Ages” and “Arthur,” says he knows why former Gov. Sarah Palin continues to attract throngs of supporters.

It isn’t Palin’s ability to leverage social media in a way few other politicos can match. Nor was it her record in Alaska of battling entrenched special interests and coming out a winner.

Nope.

Pontificating on [Palin’s} popularity, Brand mused, “People want to fuck her. That’s why they tolerate the other stuff.”

Brand’s Palin jokes have gotten him into hot water before. In 2008, after hosting the MTV Video Music Awards, he admitted that the network had cut a joke from the telecast involving Palin’s then-pregnant daughter Bristol, abortion and the electric chair. “I wanted to say she was forcing her teenage daughter to have a baby because she is so anti-abortion. But also, as a Republican she is pro-execution so she is going to give her the electric chair for being a little slut,” Brand told The Telegraph.

Update: Brand’s gag is drawing some heat from an unexpected source