LOS ANGELES (CBSLA) — A restraining order was extended five more years against an LAPD officer accused of showing off explicit photos of a detective he took while they were in a relationship.

Officer Danny Reedy, the senior lead officer of the LAPD’s Central Division, was ordered to stay at least 100 yards from Detective Ysabel Villegas and to surrender all of his firearms through Jan. 15, 2024. He was also ordered to not pass around any of the sexually explicit photos of Villegas, who is married to retired LAPD Assistant Chief Jorge Villegas.

READ MORE: Moviegoers Finally Back In Theaters, Excited For Summer Blockbuster 'Fast And Furious 9'

“I’ve taken this young man out of your life to the extent that I can,” Los Angeles Superior Court Judge James Blancarte said at the hearing. Villegas thanked him.

Reedy was not present at the hearing.

Villegas’ attorney, Lisa Bloom, said she may still sue the city on allegations she was retaliated against with a transfer of positions after she came forward. Villegas said she is currently out on sick leave.

READ MORE: Man Shot To Death In Unincorporated Area Near South Los Angeles

Reedy took the explicit photos of Villegas when they were in a relationship, according to Bloom. After the relationship ended, he sent out the photos to several other officers, some of whom took photos of the images with their own phones to avoid any documentation of distribution, the attorney alleged.

“Revenge porn is a crime in California,” Bloom said.

Reedy’s attorney says he will not confirm or deny the allegations.

MORE NEWS: Cat Named Hog Allegedly Taken By Uber Eats Driver Back Home In Studio City

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. City News Service contributed to this report.)