Actors Blake Lively and Justin Baldoni have reached a settlement in their contentious, highly publicized legal battle over their 2024 film “It Ends With Us.”

Attorneys for both stars said in a joint statement Monday that they hope the settlement “brings closure and allows all involved to move forward constructively and in peace, including a respectful environment.”

“The end product — the movie “It Ends With Us” — is a source of pride to all of us who worked to bring it to life,” Bryan Freedman and Ellyn Garofalo, who represented Baldoni, and Michael Gottlieb and Esra Hudson, who represented Lively, said in the statement. “Raising awareness, and making a meaningful impact in the lives of domestic violence survivors — and all survivors — is a goal that we stand behind.”

Lively and Baldoni went head-to-head in lawsuits filed after the movie’s release. Lively, one of the film’s producers, accused Baldoni, who directed, of sexual harassment, while Baldoni accused Lively of defamation and extortion.

A judge tossed out Baldoni’s lawsuit, and later tossed most of Lively’s claims as well, but her accusations of breach of contract and retaliation were headed for trial this spring before Monday’s settlement.