Click to email this to a friend (Opens in new window)

Click to share on Twitter (Opens in new window)

Click to share on Facebook (Opens in new window)

R. Kelly’s arrest in Chicago on federal sex crime charges came about after a Homeland Security Investigations agent watched the Lifetime series “Surviving R. Kelly” — and decided to investigate, a source told The Post.

“It was an agent on our trafficking unit who was watching that Lifetime show, ‘Surviving R. Kelly,’” said the source at Homeland Security Investigations, the federal agency’s investigative arm.

“They were looking at the victims’ interviews” and realized that “this is so much bigger than [what] he has previously been charged with,” the source said, adding that the probe was launched in January.

“It was just from watching these interviews in this documentary,” according to the source, who said that agents then traveled to interview the alleged victims.

The 52-year-old R&B singer was collared by the NYPD and Homeland Security Investigations agents.

The US Attorney’s Office in northern Illinois said Kelly faces 13 counts, including child pornography, enticement of a minor to engage in criminal sexual activity and obstruction of justice.

He also faces racketeering charges as part of a separate five-count indictment out of the Eastern District of New York.

“It’s something that he’s never been charged with before,” the Homeland Security source told The Post, referring to the racketeering charge.

On Friday morning, federal agents were conducting a search in Kelly’s residence in Trump Tower in Chicago, according to ABC News.

He is being held at the Metropolitan Correctional Center in Chicago and is expected to appear in federal court Friday morning.

“The charges arose from alleged conduct in the Northern District of Illinois as well as the Eastern District of New York,” R. Kelly’s attorney Steve Greenberg said in a statement Friday.

“The conduct alleged appears to be largely the same as the conduct previously alleged against Mr. Kelly in his current State indictment and his former State charges that he was acquitted of. Most, if not all of the conduct alleged, is decades old,” he continued.

“Mr. Kelly was aware of the investigations and the charges were not a surprise. He had already assembled a team of outstanding federal litigators. He and his lawyers look forward to his day in court, to the truth coming out and to his vindication from what has been an unprecedented assault by others for their own personal gain. Most importantly he looks forward to being able to continue to making wonderful music and perform for his legions of fans that believe in him.

“A bail hearing will be held early next week, at which time Mr. Kelly hopes to be released from custody.”

Kelly was arrested twice earlier this year on sexual abuse charges in the Windy City.

In May, he was hit with 11 counts of sex assault, including four counts of aggravated sexual assault, which carry a sentence of up to 30 years in prison. He pleaded not guilty at a court hearing in June.

His lawyer later said that one of the accusers is among the four women he was charged with sexually abusing in 2008. Kelly was acquitted then.

In February, Kelly was charged with 10 counts of aggravated criminal sexual abuse involving four victims, three of whom were underage.

The evidence against Kelly in the February case was based in part on a tape that allegedly shows him having sex with an underage girl.