A former prison guard and kidney donor who received widespread media attention for his generosity is now facing allegations that he had sexual relations with a female inmate he was responsible for supervising.

An affidavit filed in York County Superior Court by Maine Department of Corrections investigator David P. Verrier describes several sexual encounters that allegedly took place between the corrections officer, Joshua Dall-Leighton, 31, of Standish, and the 31-year-old inmate. The Press Herald does not identify victims of alleged sexual assault without their consent.

The encounters are alleged to have taken place in the prison transport van owned by the Southern Maine Re-entry Center in Alfred, where Dall-Leigton worked. Dall-Leighton drove the van, using it to transport the female inmate to her workplace in Sanford. The encounters in the van occurred in various locations in Wells and Sanford, including next to the building where the woman worked, according to the affidavit.

Last week, the York County grand jury indicted Dall-Leighton on five counts of gross sexual assault and one count of unlawful sexual contact in connection with the incidents. The indictment says Dall-Leighton had “supervisory or disciplinary authority” over the inmate. If convicted, he could face up to 10 years in prison.

Dall-Leighton is no longer working at the prison because he is facing criminal charges, his court-appointed attorney said.

When reached at his office Tuesday, the attorney, Neal Weinstein of Old Orchard Beach, said Dall-Leighton denies the accusations against him.

“My client has no criminal history and obviously there was no force used,” Weinstein said. “She is a convicted felon. It will come down to: Do you believe a person without a criminal record or someone who is a felon?”

According to the State Bureau of Identification, the female inmate was convicted in January 2012 in Rockland of elevated aggravated assault, robbery and burglary. She was sentenced to 10 years in prison with all but six years suspended.

Dall-Leighton received local and national media attention in 2015 when he responded to a plea written on a car window from a woman who was looking for a kidney donor. He turned out to be a match for the woman, Christine Royles of South Portland.

Royles was diagnosed in 2013 with lupus and an autoimmune disease, ANCA vasculitis. She had entered permanent kidney failure, but rather than languish on a national waiting list, Royles painted the sign on her car window. The transplant was successfully performed in June 2015 at Maine Medical Center in Portland.

The transplant had been delayed to give lawyers the time they needed to sort out how to handle a fundraising effort on GoFundMe to cover expenses for the six weeks that Dall-Leighton was expected to take off from work after undergoing surgery. The fundraising goal had been $6,000, but the effort raised nearly $50,000. Federal and international laws prohibit the sale of organs. Attorneys determined that there was no intent to profit from donating the organ.

“The donation was unsolicited and not for profit,” Weinstein said. “His actions alone speak to the character of the individual.”

The affidavit filed by Verrier claims that Dall-Leighton would send text messages to the inmate while she was home on furloughs. It said prison officials also found a letter that the victim had written to a Bangor attorney who represented another female inmate.

“I avoided sexual intercourse with this officer for some time but because of his position of power, and the many things I stood to lose, I felt pressured to engage,” the alleged victim wrote. “This officer transported me to work several times per week and we were often alone while driving. I requested a job change, but was repeatedly denied. I felt I was in a no-win situation,” .

The affidavit alleges that Dall-Leighton, who is married and has three children, had sexual contact with the inmate between December 2015 and February 2016.

Weinstein said the next step for his client will be an arraignment in York County Superior Court.