“It Ends With Us” actor and director Justin Baldoni faced a major blow in court Monday after a judge dismissed his $400 million countersuit against Blake Lively and Ryan Reynolds. Filed in January alongside Wayfarer Studios, Baldoni’s complaint accused the couple of defamation and sought massive damages for alleged lost income. Publicist Leslie Sloane was also named as a co-defendant.

The countersuit was filed shortly after Lively sued Baldoni and others connected to the film, claiming she was harassed and then targeted by a reputation-damaging campaign once she spoke out. In an amended complaint, Lively further alleged that Baldoni made several women on set uncomfortable.

Baldoni went a step further by suing The New York Times for libel, alleging it had cooperated with Lively to damage his image. That suit was also dismissed on Monday by U.S. District Judge Lewis J. Liman, who said Baldoni’s legal team may amend portions of the claims—specifically tortious interference and breach of implied covenant—by June 23.

“Today’s opinion is a total victory and a complete vindication for Blake Lively, along with those that Justin Baldoni and the Wayfarer Parties dragged into their retaliatory lawsuit, including Ryan Reynolds, Leslie Sloane and The New York Times,” said attorneys Esra Hudson and Mike Gottlieb in a statement. They called the lawsuit a “sham” and said the court “saw right through it.”

Blake Lively; Justin Baldoni.

The pair added that the next phase will focus on recovering attorney’s fees, treble damages, and punitive damages from Baldoni and others named in the countersuit. Baldoni’s lawyer, Bryan Freedman, did not respond to requests for comment as of Monday.

The dispute traces back to the wrap of filming on It Ends With Us, a movie adaptation of Colleen Hoover’s bestselling novel. Lively originally alleged that Baldoni sexually harassed her and retaliated after she voiced concerns. She also accused him of hiring a crisis PR firm to orchestrate a “social manipulation campaign” against her. Baldoni has denied the allegations.

Even Taylor Swift was briefly dragged into the case after Baldoni’s legal team attempted to subpoena her as a potential witness. A spokesperson for Swift dismissed the move as an effort to generate tabloid clickbait.

Just last week, another judge denied Lively’s request to dismiss Baldoni’s emotional distress claims unless she agreed to provide her medical and mental health records. The trial is currently scheduled for March.