ALFRED — A former state prison guard in custody on a charge that he sexually assaulted a female inmate is accused of having sex with her in a prison office, a prison bathroom, prison transport vehicles and a hospital room where she was taken while in custody to have her appendix removed.

Those allegations and others against Bret Butterfield of Auburn are documented in graphic detail in an investigator’s 22-page affidavit that had remained under seal at York County Superior Court until Thursday morning.

An order impounding Butterfield’s case file was lifted Thursday following an announcement on Wednesday by Maine State Police that Butterfield had been arrested.

Butterfield also is accused of having a sexual relationship with a different female inmate after she was released from the Southern Maine Re-entry Center in Alfred last year and of making sexual advances toward other inmates under his supervision at the facility for women nearing the end of their prison sentences. Butterfield, 23, is married.

Although he has been in custody at the York County Jail since Aug. 26 and made an initial court appearance by a video link from the jail on Aug. 27, no government agency would confirm Butterfield’s arrest until Maine State Police spokesman Stephen McCausland did so Wednesday in response to a Portland Press Herald inquiry.

York County Sheriff Maurice Ouellette announced Thursday night that he will hold a news conference Friday morning at his office located next door to the Alfred prison facility “to discuss some recent indictments involving current and former corrections officers.”

It was not immediately clear how many current or former guards have been indicted, whether the sheriff’s announcement is related to Butterfield’s arrest or whether the case against Butterfield has been presented to a grand jury.

While the court documents unsealed Thursday describe sexual allegations against Butterfield from multiple female inmates, he is so far charged with sexually assaulting only one of them, a 25-year-old convicted burglar who was released from prison on April 4.

Butterfield has not been required to enter a plea to the Class B felony of gross sexual assault of an inmate under his supervision. He is currently being held on $50,000 cash bail. As a condition of bail, Butterfield also is ordered to have no contact with four adult female inmates who were once under his supervision and to have no contact with any females under the age of 18.

Butterfield’s attorney, Neal Weinstein, said Thursday night that he has filed a court motion seeking a bail hearing to argue for a lower bail amount and for his client’s release. No date has been set.

“Even if you read the reports, there are no allegations that he used any coercion, threats or manipulation of any kind,” Weinstein said. “If you read the stories told by these women, they have huge histories of criminal conduct. I’m not sure how much credibility there is. They know how to use the system. From the reports, they were the sexual aggressors against my client.”

Butterfield began working as a correctional officer in 2012 at the Maine Correctional Center in Windham and was later transferred to the Alfred facility. He resigned on June 30 after learning that the Department of Corrections had begun investigating him, according to court records.

Department of Corrections investigator David Verrier said in the affidavit unsealed Thursday that he first began investigating Butterfield in May by interviewing female inmates and then conducted a stakeout with another law enforcement officer in Scarborough on June 26 to photograph Butterfield with the woman he is accused of sexually assaulting.

Verrier said in the affidavit that he interviewed that woman on Aug. 5 at the Adult Probation Office in Portland and that she described oral sex encounters with Butterfield starting in January, but that the first time they had sexual intercourse was at her grandmother’s house in Scarborough while she was on furlough from prison between April 1 and 3.

“(The woman) said she wasn’t enjoying the sex because she wanted it to be in a different setting,” Verrier said in his affidavit.

The woman, who is not being identified because she is considered a victim in Butterfield’s case, did not return a phone message left with her grandmother on Thursday evening. The grandmother said that Verrier had been extremely aggressive in his investigation against Butterfield and that the allegations contained inaccurate information.

“He’s a really nice guy who’s getting a raw deal,” the grandmother said of Butterfield. She is also not being named by the Press Herald since using her name could identify the victim.

Verrier also interviewed another correctional officer, Joshua Dall-Leighton, who worked with Butterfield in both the Windham and Alfred prison facilities and is his friend.

Dall-Leighton’s wife, Ashley, said in a phone conversation Thursday that the Department of Corrections had issued a written order to her husband not to talk to the media about the case against Butterfield, but that there was nothing stopping her from talking.

“Bret Butterfield is supposed to be the godfather of one of our sons,” said Ashley Dall-Leighton, who lives with her husband and newborn twin sons in Westbrook. “Never in a million years would I have expected him to do something like this. Neither of us had a clue what was happening.”

Ashley Dall-Leighton said the Department of Corrections suspended her husband from work for several weeks, partially without pay, while the investigation against Butterfield was pending. He is now working at the Southern Maine Re-entry Center, she said.

Butterfield’s wife, whose phone number is listed in court records, did not return a phone message seeking comment.