The man who allegedly attacked R. Kelly in prison has identified himself.

According to legal papers obtained by TMZ, Jeremiah Shane Farmer claimed he's the inmate who jumped on the I Believe I Can Fly hitmaker in his jail cell at the Metropolitan Correctional Center in Chicago in August.

Farmer alleged "the government made me attack" Kelly - although he didn't explain why - and said he pulled it off in hopes of shedding light on government corruption, insisting he's been failed by the justice system.

Kelly, who is behind bars awaiting trial on a series of child sex abuse charges, was attacked in his cell at the institution last month, with his attorney Steven Greenberg now confirming to TMZ that Farmer was the one who did it.

Greenberg previously explained that the "violent" inmate crept in when Kelly was sleeping and started "stomping on (Kelly's) head, repeatedly".

The inmate, who has the phrase "F**k the Feds" tattooed on his face, also had "an ink pen with him that he was going to use to stab Mr. Kelly", Greenberg continued, adding that others grabbed him before he could use it.

"This is an inmate that never should have been anywhere near Mr. Kelly, an individual who is charged with the most violent of crimes, and one who plainly has no respect for the rules," Greenberg stated, asking the court to release his client on bail.

He also claimed the inmate was apparently angered by lockdowns inside the prison, caused by "peaceful" protests in support of Kelly outside of the facility.

Following the attack, Kelly was placed in solitary confinement for his own safety. It's unclear whether or not he's still there.

LATEST NEWS