A former Virginia police officer was on-duty when he followed a 17-year-old high school student home and raped her in his patrol car in 2019, according to officials who’ve announced he’s been sentenced to nearly two decades in federal prison.

Cleshaun A. Cox, 31, previously pleaded guilty in state court to charges of carnal knowledge and abduction in August 2021 and was sentenced to five years in prison in relation to the rape, the U.S. Attorney’s Office for the Eastern District of Virginia said in a Nov. 28 news release.

He spent around 4.5 years in state custody as he awaited his federal sentence, according to the attorney’s office. Now, Cox has been sentenced to 18 years in federal prison for violating the civil rights of the teenager by forcibly sexually assaulting her while on duty for the Portsmouth Police Department, the attorney’s office said.