Gary Mariner, the son of a one-time Cape Elizabeth police chief, used his dead father’s badge and a gun to intimidate a prostitute in Portland last month into giving him free sex, according to police.

Mariner, 57, of Lyman, picked up the 25-year-old prostitute in his car on Portland’s Boynton Street on Sept. 15 and told her, “It’s not (your) lucky day,” as he showed her the Cape Elizabeth police badge, Portland police Detective Maryann Bailey wrote in a police report.

He allegedly told the woman that he had been called back from retirement to work for the Maine State Police as part of a special prostitution unit. He then drove her to the parking lot of Concord bus station at Thompson’s Point, where he pulled a pistol from the door pocket of his Toyota Corolla, rested it on his leg and demanded she perform a sex act on him, Bailey wrote in the report.

Mariner was arrested at his home in Lyman on Thursday on a felony charge of gross sexual assault and a misdemeanor charge of impersonating a public servant. Details of what led to his arrest were not immediately available until Bailey’s affidavit was made public at the Cumberland County Courthouse in Portland on Monday.

Mariner remained in custody at the Cumberland County Jail in Portland on Monday, unable to pay the $100,000 cash bail set by a judge.

Police first learned of the woman’s accusations against Mariner on Sept. 19, when she made a report to a police officer. She described in detail the badge, the gun, Mariner’s car, the cigarettes he smoked and soda he drank in such detail that police were able to match her description to objects they later found at Mariner’s Lyman home, Bailey wrote in the affidavit.

The woman told police that she asked Mariner whether she was under arrest, but that he told her she could “work it off.” After leaving the bus station parking lot, the woman said he drove her to St. John Street and let her out, the affidavit states.

As police investigated the woman’s allegations, they obtained video surveillance camera footage from the bus station, which showed Mariner’s car and license plate number. They contacted the Maine Criminal Justice Academy and learned Mariner had never been a police officer. But the Cape Elizabeth Town Clerk’s Office confirmed that Mariner’s late father, Herbert Mariner, had once been the town’s chief of police.

Police obtained a search warrant on Oct. 1 to search Mariner, his vehicle and his home.

During an interview at his home, Mariner, who is married, allegedly admitted to hiring prostitutes in Biddeford and Portland but denied having a police badge. A detective searched the home, discovering both a police hat badge and police breast badge in a jewelry box, Bailey wrote in the affidavit.

Mariner appeared before Judge Jeffrey Moskowitz at his initial court appearance Friday but was not required to enter a plea because one of the charges is a felony. The next step in the court proceedings is for prosecutors to present the case against him to a grand jury seeking an indictment.

If convicted of the felony, Mariner faces up to 30 years in prison. He has two prior misdemeanor convictions on his record, for assault in 1978 and criminal threatening in 1983.