LOS ANGELES (KABC) -- Los Angeles Police Department Detective Ysabel Villegas used to investigate cases of sexual assault and domestic violence. Now, the tables are turned, and she is the alleged victim in a revenge porn scandal that's rocked the LAPD."I did not want to be here," said Villegas outside court Tuesday. "This is the last place or the last thing I ever wanted to do and I'm just so sad it's come to this."Villegas says LAPD Senior Lead Officer Danny Reedy began to threaten and extort her near the end of their five-year extramarital affair. She says he sexually assaulted her, physically beat her and threatened to distribute sexually-explicit photographs of Villegas.In her application for the restraining order, Villegas alleges:"He released intimate photos of me, extorting me. He was extorting and harassing me, and then released the photos in November because I broke up with him in August. It was revenge to ruin my reputation and embarrass me in front of our peers."On Tuesday, Los Angeles Superior Court Judge James Blancarte granted Villegas' request for a permanent restraining order against Reedy, calling the allegations among the most serious he's seen in his courtroom. Reedy must now stay at least 100 yards away from Villegas, surrender all of his firearms and deadly weapons, and refrain from distributing sexually explicit photographs of Villegas.Reedy previously denied all wrongdoing through his lawyer, but did not show up to court Tuesday to contest the restraining order. His attorney told the judge that Reedy is exercising his 5th Amendment right to remain silent given that a criminal investigation is now underway."We are not admitting anything, nor are we denying anything," said Reedy defense attorney Mike Williams.Outside court, Villegas attorney Lisa Bloom called Reedy a "bully.""Mr. Reedy did not appear," Bloom told reporters. "I think that's because he knows that we would've looked forward to cross-examining him with the evidence and required him to answer questions if he'd testified, so he backed down and he didn't come."The criminal investigation is being handled by the Los Angeles District Attorney's Office. So far no charges have been filed."Revenge porn in California is a crime," said Bloom. "We don't know how many people have seen these explicit photos. We do have witnesses that say they were being passed around among different LAPD officers which is highly inappropriate."Exhibits in the application for the restraining order include nude photos of Villegas and text messages she says came from Reedy."I will post the pictures. I swear. I wlll ruin you," one text message reads.Another reads: "Stand by for the destruction. Of your reputation. You're done."Villegas says Reedy also threatened to send the photos to her family, including her son and her husband -- former LAPD Assistant Chief Jorge Villegas. Jorge Villegas abruptly retired from the department in October after a complaint about possible sexual misconduct was sent to LAPD Police Commission President Steve Soboroff. Sources confirm to Eyewitness News that Villegas was surveilled by the LAPD's highly secretive Special Operations Division and was caught apparently engaging in sexual activity in a parking lot with a female subordinate.Ysabel Villegas rose through the ranks of the LAPD for nearly 30 years before going out on medical leave last year for stress. While out on leave, she was transferred out of the elite Robbery Homicide Division, a move she and Bloom believe may be retaliation for reporting the allegations against Reedy.LAPD spokesperson Josh Rubenstein confirms that Reedy is assigned to home duty with pay and an administrative investigation is underway. Rubenstein could not comment on Villegas' transfer because it is a personnel matter."I have been a law enforcement officer with the LAPD for almost 30 years," Villegas said outside court. "I love my job.... and it's very sad to leave like this... I don't deserve this."Got a tip? Email ABC7 Investigative Reporter Lisa.Bartley@abc.com