In what could go down as the most bizarre case in the history of jailhouse visits, a Florida attorney has been accused of paying female inmates to have sex with him while he recorded the acts, scheming to make a video entitled “Girls in Jail.”

Investigators said they caught him red-handed, or in this case, with his pants down, just before he was about to engage in a sex act with a prisoner.

Last month, the Pinellas County Sheriff’s Office fielded a tip that attorney Andrew Spark was offering to pay inmates in exchange for sexual acts inside the Pinellas County Jail in Clearwater, Fox 13 reported.

Investigators said 25-year-old inmate Shauna Boselli told them that Spark visited her in jail, even though he was not her attorney. She said Spark offered to put money in her commissary account in exchange for oral sex and bragged about meeting another Pinellas County Jail inmate earlier that day.

While Boselli declined the attorney’s alleged offer, investigators said that Spark did meet with another inmate, 28-year-old Antoinette Napolitano, that same day, and that those two had sex within the jail at least six times between June and December of 2017.

RELATED: Elite lawyer who represented some of Trump’s accusers may have committed a big no-no

Authorities said Spark’s plan started with an “interview” of Napolitano in her jail uniform, in which he asked her to detail her sexual fantasies and recorded her while she performed sexual acts.

Investigators said that Spark was scheduled to meet with Napolitano at the jail on Sunday. Detectives entered the attorney visitation room just as the two were about to engage in a sexual act and caught Spark with his penis “fully exposed,” according to the sheriff.

The attorney was charged with exposure of sexual organs, introduction/possession of contraband into a county detention facility and soliciting for prostitution. Spark did not talk to deputies, investigators said, and asked to have an attorney.

Detectives alleged it is possible that Spark executed the same pay-for-sex scheme other female inmates at the Pinellas County Jail, and possibly even at other jails across Tampa Bay and Central Florida. Authorities are continuing their investigation, and Spark may face more charges related to the case.

A Florida attorney allegedly visited female inmates to offer his services — sexual services Pinellas County Sheriff's Office