Receive the latest entertainment-news updates in your inbox

Mischa Barton held a press conference with her attorney Wednesday, March 15, 2017, in Woodland Hills to announce she has taken legal action in a "revenge pornography"case.

Expressing relief and satisfaction, actress Mischa Barton reached an agreement Monday with an ex-boyfriend in her effort to stop the sale of a sex tape she said was made against her will in a so-called "revenge porn" case.

Los Angeles Superior Court Commissioner James Blancarte approved the settlement, under which 30-year-old Jon Zacharias agreed not to distribute any of the images and to turn them over to Barton and her attorney, Lisa Bloom.

"I congratulate you all. It's not often we get the parties to agree to anything," Blancarte told the 31-year-old Barton and Zacharias, who sat at opposite ends of the counsel table with their lawyers.

Because of the agreement, neither Barton nor Zacharias had to testify during a hearing on whether to extend a previously issued restraining order. Outside court, Barton said she was pleased with the agreement.

Blatt said Zacharias will cooperate with any criminal investigation in the case and would not allow him to speak to the media after the court proceeding. He said Zacharias has no duty to apologize to Barton and said men can also be victims of crimes involving secretly recorded videos.

In March, Commissioner Laura Hymowitz granted the British-born former "The O.C." actress temporary restraining orders against Zacharias and another former boyfriend, 39-year-old Adam Shaw. The orders directed the men to stay at least 100 yards from Barton, her home, her workplace, her car and even her dogs. They also were directed to not disseminate the naked images or show them to anyone else.

Barton's court papers stated that Zacharias recorded the former couple having sex and also took photos of her while she was nude, all without her knowledge. She alleges he is trying to sell the tapes for $500,000.

She said in a sworn statement that after she broke up with Zacharias, she began dating Shaw. She said Shaw appeared to want to help her delete the objectionable photos from Zacharias' computer, but he later also tried to take advantage of her and forged her signature on some checks.

Barton contended both men are in need of money and might sell the photos to do so.

"I would be devastated to have the sexually intimate videos or photos of me published," Barton said. "It would hurt my career and I would be publicly embarrassed."

She said an attempt to sell the images would be tantamount to "domestic violence in the form of revenge pornography.''

Bloom said she does not believe the case against Shaw will be resolved before a hearing on that matter is scheduled Wednesday.

Bloom said that although Barton is a celebrity, she is still a human being and was very distressed when she first came to Bloom asking what could be done about the images. The actress now feels empowered and can celebrate a victory, Bloom said.