A 51-year-old son of a federal judge pleaded guilty on Tuesday to secretly filming sex acts he had with several women over a number of years but might end up avoiding jail time for participating in a program that aims to find the root causes of a person's crime.

Daniel McAvoy, of Manhattan, admitted to seven counts of unlawful surveillance in state Supreme Court after being accused of covertly recording four women disrobing or engaging in sexual acts with him on several occasions, according to Gothamist, citing the Manhattan District Attorney’s Office.

The sexual encounters were consensual and took place in multiple apartments McAvoy rented on Manhattan's Upper East Side – but prosecutors say the women had no idea they were being filmed.

COREY FELDMAN SLAMS DIDDY AMID SEX TRAFFICKING PROBE, VOWS TO FIGHT SEXUAL ABUSE IN HOLLYWOOD

stock image of judge

The son of a federal judge pleaded guilty on Tuesday to secretly filming sexual encounters he had with several women over several years but might end up avoiding jail time. (iStock)

Assistant District Attorney Danielle Turcotte said that McAvoy had filmed dozens more women, but the statute of limitations had run out in the other cases. 

According to reports, investigators seized three hard drives and more than 150 DVDs that McAvoy kept at the home of his father, Thomas McAvoy, a senior judge in Binghamton, New York. He was appointed in 1986 by former President Ronald Reagan.

The DVDs had handwritten labels that included dozens of women’s names and specific sex acts in pornographic terms, per the report. Investigators raided the judge's home while acting on a tip from McAvoy’s then on-off girlfriend. He was indicted in 2022, initially on 29 counts of unlawful surveillance. 

McAvoy has been going through Manhattan’s Felony Alternative to Incarceration (ATI) Court, a program that offers alternatives to incarceration for all types of felony cases, including violent offenses and sex offenses, and is meant to get at the root problems that lead to crime, Gothamist reports. 

His attendance in the program allowed his attorneys to call for an open plea, whereby the defendant leaves their sentence to the court without any agreement with the prosecutor.

INDIANA HOUSE GOP CANDIDATE ARRESTED ON EVE OF ELECTION

New York Supreme Court building, Madison Avenue, New York City.

New York Supreme Court building, Madison Avenue, New York City.  (Joan Slatkin/Education Images/Universal Images Group via Getty Images)

The District Attorney’s Office opposes the plea and is recommending a prison sentence. 

"He is an over-50-year old man who purportedly has a master’s degree and is self-employed with adequate resources," Turcotte said, according to Gothamist, citing the court record. "He made this decision to violate the trust of his sexual partners countless times over the last fifteen years. [He] made this decision over and over and over again for purely selfish motives and without any regard for the women."

The publication also spoke to one of McAvoy’s victims, who slammed the decision to consider the plea, saying McAvoy is still a threat to women.

"The open plea fails the victims that had the courage to speak out, those that still today have no idea they were filmed without consent, and sadly, those other women who will probably suffer the same fate," she told Gothamist.

Gavel in court room

McAvoy’s former on-off girlfriend, who dated him over a period of 10 years, filed a civil suit against him in August, (Getty Images )

McAvoy’s former on-off girlfriend, who dated him over a period of 10 years, filed a civil suit against him in August, according to the New York Post

The mother of two claimed she had no clue she was being filmed during their sexual relationship until months after she broke it off, when the Manhattan District Attorney’s office called her in and showed her one of the clips, according to the lawsuit.

"Over the course of many years, Daniel McAvoy engaged in a premeditated plot to secretly record hundreds of sexual encounters with women he had lured to his home," the lawsuit states, per the Post.

CLICK TO GET THE FOX NEWS APP

"He meticulously stored and cataloged unlawful sex videos depicting his victims, and occasionally shared these unlawful sex videos with others," the woman, identified only as Jane Doe, said in the lawsuit.

"Learning that a man she had trusted for so many years was secretly videotaping her most intimate and vulnerable moments has turned Jane Doe’s life completely upside down," she said in the legal filing.

She said that she was bringing the case so she "can achieve a measure of personal justice."