TULSA, Oklahoma - Police arrested a man they said took images of children he knew off social media, then edited them to show himself having sex with them.

Detectives said some of the photos included infants.

Tulsa’s cybercrimes detectives arrested 34-year-old Jerry Berry after a seven-month-long undercover investigation.

They said Berry sent undercover detectives pictures and videos of child pornography over a peer-to-peer network.

They said a search of his phone showed more than 100 child porn images or videos.

Detectives said he was taking photographs from social media pages of some of the children he knows personally, and digitally manipulated them so it would appear they were nude and he was performing sex acts on them.

When officers went back to talk to him, the 34-year-old man had told a friend he was going to jump off a bridge. Police decided they had probable cause for Berry's arrest and that it would protect him from self-harm.

Detective Joshua Showman said it is rewarding for him and the cybercrimes unit when they can close a long-term investigation with a confession and arrest.

"It is also kind of harrowing to know what people are doing with children’s images on social media. I'm sure this is happening. It is the first time we've seen it in Tulsa. Obviously, if this person is interested in that kind of behavior, then other people probably are as well,"   Showman said.

Berry was booked into jail for five counts of distributing child pornography and one count of felony possession of child porn.

News On 6 also learned Berry used to teach at Christ the King Catholic School in Oklahoma City.