O.J. Simpson received a pounding by a gang of homophobic prison inmates who were up in arms after learning about his sex romp with a jailhouse transsexual, The National ENQUIRER has exclusively learned.

“You f—ing f—-t,” sources said the prison toughs screamed as they dished out a vicious beat down that left O.J. – who once held the NFL record for the most rushing yards in a season – battered, bruised and lying on the jail floor.

“He was jumped and given an ass kicking.  He could have been killed!” a prison insider said.

“There was blood all over his face and he had a black eye that was swollen shut. He looked like he was in a war and lost.”

O.J., 67, cowered in his cell for days afterward, avoiding guards and prison administrators, according to the source.

The drama at the Lovelock Correctional Center, in Nevada, unfolded last month after it was revealed – exclusively by The ENQUIRER – that he’d hooked up with transsexual Jazmena Jameson when they were both behind bars in 2013.

The 6-foot, 160-pound Jazmena told The ENQUIRER she’d given the Buffalo Bills star oral sex and that she believed she might have infected the disgraced American football star with AIDS.

She also made comments about the size of his manhood, prompting further disgrace for O.J. in the prison yard.

“Jazmena mentioned in the story that O.J. had an ‘average-size penis’ – as if it wasn’t bad enough that he was getting lovin’ from a tranny!” said a source. “He’s a marked man!”

In the wake of Jazmena’s explosive account of her sexual rendezvous, O.J. had been the subject of endless jailhouse ridicule, said a source.

The inmates plotted their attack meticulously, waiting for him to walk into an area in the cellblock that’s out of sight from the guards and cameras.

THAT’s when they ambushed him!

For the FULL STORY with ALL THE DETAILS – it’s only in the new ENQUIRER on sale now!