A Kentucky Republican lost the support of the state GOP over his racist Facebook posts — but he won his statehouse race.

Dan Johnson refused to apologize for posts comparing President Barack Obama to a monkey and said he would rather lose the election than stop making “politically incorrect” social media comments.

“I want to be myself,” Johnson said. “I would rather be myself than be elected as state representative of the 49th.”

ADVERTISEMENT

Johnson, who defeated incumbent state Rep. Linda Belcher, was among the candidates who helped Republicans take over Kentucky’s legislature — the last southern state with a Democratic majority — for the first time since 1920.

“Although Southern Democrats were prematurely declared extinct a few years ago, this is literally the last nail in their coffin,” said U.S. Rep. Thomas Massie (R-KY).

Johnson, who frequently shares Confederate flag images online and has called for a ban on the Muslim religion, defeated Belcher by fewer than 200 votes.

The chairman of the Republican Party of Kentucky apologized to voters after Johnson’s social media posts came to light, saying the candidate’s views did not reflect the GOP.

The party asked Johnson to quit the race, but he refused — and now he’ll join the GOP’s new majority.

ADVERTISEMENT

Johnson, a Donald Trump supporter and bishop of Heart of Fire Church in Louisville, insisted that he’s not racist and described his posts comparing the Obama family to apes as “satire.”

“It wasn’t meant to be racist, I can tell you that — my history’s good there,” Johnson said. “I can see how people would be offended in that. I wasn’t trying to offend anybody, but, I think Facebook’s entertaining.”