A former Los Angeles Police Department officer has been sentenced to six years in prison after being convicted of raping a woman while he was off-duty in 2015.

William Rodriguez, 37, was found guilty of one charge of forcible rape back in June, and was sentenced on Thursday, according to the Los Angeles County District Attorney’s Office.

He was arrested in July 2019 on multiple counts of sexual assault, including two alleged rapes.

Rodriguez, a ten-year LAPD veteran, was taken into custody and immediately relieved of his duties.

Rodriguez was identified as the suspect in the rape after authorities received a “cold hit” on his DNA through the Combined DNA Index System, according to the LAPD.

Detectives began investigating Rodriguez after a woman came forward to accuse him of rape in 2018. That incident led to the DNA hit tying him to the 2015 incident. Both alleged attacks happened while Rodriguez was off-duty.

The 2015 attack happened when Rodriguez drove the victim to an unspecified location and then raped her, according to the DA’s Office.

At the end of the trial, jurors deliberated for one-and-a-half days before finding Rodriguez guilty for the 2015 rape, but not guilty for the alleged attack in 2018.

“As a police officer, William Rodriguez was entrusted with protecting our community from the very violence he inflicted on his victim.” District Attorney George Gascón said after the sentencing. “I commend the survivors who testified at trial for their bravery, ensuring that a measure of justice was served.”