Mischa Barton’s “revenge porn” lawsuit has ended in “victory,” according to her lawyer, Lisa Bloom.

In March, reports emerged that a sex tape involving Barton was being shopped to porn outlets, and the former “O.C.” actress fired back by filing a lawsuit against Jon Zacharias, her ex-boyfriend and one of the alleged peddlers of the tape. On Monday, Barton and Bloom appeared in Los Angeles Superior Court and reached a settlement, under which Zacharias agreed not to distribute any of the images and to turn them over to Barton, according to CBS Los Angeles.

“COURT VICTORY today with Mischa Barton,” Bloom tweeted later on Monday, with a photo of herself and Barton smiling outside of the courthouse. “Distribution of the explicit images banned, ex stays 100 yards away forever.”

“Today we have won an important agreement, which permanently blocks the dissemination of these images,” Bloom said in a statement to People. “All explicit photos and videos of Mischa must be handed over to me immediately. Her ex must stay 100 yards away from her today, tomorrow, and forever. And the court will retain jurisdiction over the case in case we need further enforcement.”

“I am proud to declare victory for Mischa,” the statement continues. “She did this not just for herself, but for all women and girls. Mischa wants everyone to know that we have the right to control our own bodies and decide whether or not to have explicit photos out there for the world to see. If a woman wants to do that, fine. If she doesn’t, fine. The choice is hers and hers alone.”

In court papers, Barton alleged that Zacharias recorded the former couple while they were having sex, as well as took photos of her while she was nude, without her knowledge. The suit added that Zacharias was trying to sell the tapes for $500,000.

In March, when Barton first retained Bloom, Barton said in a statement that her “worst fear was realized when I learned that someone I thought I loved and trusted was filming my most intimate and private moments, without my consent with hidden cameras.”