Vincent A. Cirillo Jr., a longtime Montgomery County defense lawyer, on Tuesday admitted raping a 22-year-old unconscious client at her West Norriton apartment last year.

Hours into jury selection for his potential trial, Cirillo, who for more than a year had maintained his innocence, agreed to plead guilty to a single count of rape. In return, prosecutors dropped four other felony counts.

"I had to do this for my family," Cirillo said as he was led from the courtroom in handcuffs. "I didn't want to risk the maximum amount of exposure I was facing if convicted."

He still could spend years in prison. Common Pleas Judge Steven T. O'Neill told Cirillo he faces a maximum term of 10 to 20 years, potential designation as a sexually violent predator, and the loss of his law license.

Assistant District Attorney M. Stewart Ryan said he plans to argue for a state prison sentence.

"In this case the defendant was her lawyer," Ryan said, "someone that she trusted."

Prosecutors said the woman hired Cirillo, 56, of Gladwyne, last year to represent her in a criminal matter. In August 2015, he went to her home for a meeting to discuss the case.

The woman told police that she thought Cirillo drugged her because he encouraged her to drink alcohol and she became too impaired to stand up. She said she did not remember what happened after a certain point in the evening and that someone later found her unconscious on her bed in only her underwear.

She went to the hospital for treatment and reported the incident to police.

Detectives then arranged surveillance as she met with Cirillo. He confirmed they had sex, according to a criminal complaint filed in the case, by saying he used a condom and telling the woman he had no venereal diseases.

Prosecutors also found photographs on Cirillo's phone that they planned to present at trial, showing the woman unconscious on her bed.

Since his arrest in August 2015, and even as jury selection began Tuesday morning, Cirillo had maintained his innocence. He entered the plea as his wife and daughter sat behind him in the front row of the courtroom.

His victim did not attend the proceeding.

Cirillo is the son of late Superior Court Judge Vincent A. Cirillo.

His lawyer, Nino Tinari, said he will argue at sentencing that his client had gone through a bad period in his life.

"It's devastating," Tinari said. "I've known the family for so long, it bothers me."

Cirillo also still faces trial on charges he impersonated his victim's lawyer in an attempt to obtain her confidential court records.

Ryan, the prosecutor, said Cirillo went to the county's domestic relations office last month and pretended to be the woman's attorney in an attempt to obtain her custody files. He now faces counts of identity theft, conspiracy, and forgery - charges that led the judge to revoke his bail last week.

No date was set Tuesday for Cirillo's sentencing.