IN a development that has sparked outrage, O.J. SIMPSON could walk free from prison soon, thanks to KHLOE KARDASHIAN, whom he says plans to serve as a character witness during his upcoming bid for a new trial, insiders told The ENQUIRER.

“It’s outrageous that Khloe would even think about helping O.J.,” an insider told The ENQUIRER. “He deserves to remain in prison until he rots. Khloe should think twice about this. Her plan could backfire and turn a lot of people against her.”

Simpson, 65, is certain he’s the real father of Khloe, 28, and in the last six months he’s reached out to her through mutual friends to convince her that she is his daughter, one source said.

“Khloe was skeptical and at first laughed it off and denied it on her TV show,” said the source. “But after several months of indirect contact, in­cluding letters O.J. wrote to Khloe, she began to develop a kinship with him.”

The disgraced football legend is serving up to 33 years in a Nevada state prison for a 2007 armed robbery and kidnapping conviction at a Las Vegas hotel.

Meanwhile, as The ENQUIRER previously reported, O.J. claims he and Khloe’s mom, Kris Jenner, had an affair when she was married to his pal and attorney Robert Kardashian – and Khloe was the result.

“O.J. told me, ‘Khloe wants to help me because she thinks I got a bum deal getting sentenced to prison for so long,’ ” said the insider.

Now, Khloe is contacting Simpson’s lawyers and requesting to be a character witness for him, the insider added.

“O.J. has told his pals that Khloe is even going to write a letter to the judge, explaining why he deserves another trial and revealing the reason why he stormed into that Vegas hotel room,” said the insider. “O.J. says she believes he was set up and she wants the judge to know that.”

Simpson and several armed men broke into a hotel room at the Palace Station Hotel Casino in September 2007 to take O.J. memorabilia from two dealers. “O.J. told Khloe he had no idea that the men that he met at the hotel bar were armed and also that he believed the memorabilia dealers had some photographs of his kids that he wanted back,” said the source. “Khloe was moved by O.J.’s explanation.”

When Khloe asked her mom Kris Jenner what she should do, the insider says Kris told her to just do what she felt was right.

Meanwhile, O.J.’S attorney’s are very close to making a great case that he should get a new trial because the lawyer who repre­sented him in 2008, Yale Galanter, blew the case – and didn’t even tell him about a two- to five-year plea deal that he says he would have taken.

“If the judge grants O.J. a new trial, then he can make bail and get out of prison until the new trial starts,” the source explained. “If Khloe makes an emotional plea, it may very well be the tipping point in setting him free after four years.”