A retired police officer from the Hudson Valley confessed he sexually abused and raped two relatives for over a decade.

On Friday in Orange County Court, 46-year-old Nicholas McAteer of Greenwood Lake was sentenced to 18 years in prison following his guilty plea to two counts of rape.

McAteer confessed in April he forcibly raped two girls. McAteer raped the first girl in 2007 when the girl was 18. He raped a 15-year-old girl in 2011.

Both victims were related to McAteer, a 24-year NYPD veteran, according to the New York Daily News. He retired from the NYPD with a ranking of lieutenant in March of 2017.

The guilty plea satisfied an 82-count indictment, involving a series of sexual offenses that he committed against both girls over a number of years, officials say.

“Sex offenses are among the most despicable acts that people can commit against others and can often have profound adverse impacts on victims, especially young victims," Orange County District Attorney David Hoovler said.