Blake Lively has accused her “It Ends With Us” director and co-star Justin Baldoni of sexual harassment on the set of the movie and a subsequent effort to “destroy” her reputation in a legal complaint.

The complaint obtained by The Associated Press, which The New York Times reported was filed Friday with the California Civil Rights Department, precedes a lawsuit. It names Baldoni, the studio behind “It Ends With Us” and Baldoni’s publicists among the defendants.

In the complaint, Lively accuses Baldoni and the studio of embarking on a “multi-tiered plan” to damage her reputation following a meeting in which she and her husband Ryan Reynolds addressed “repeated sexual harassment and other disturbing behavior” by Baldoni and a producer on the movie.

The plan, the complaint said, included a proposal to plant theories on online message boards, engineer a social media campaign and place news stories critical of Lively. The complaint also says Baldoni “abruptly pivoted away from” the movie’s marketing plan and “used domestic violence ‘survivor content’ to protect his public image.”

“These claims are completely false, outrageous and intentionally salacious with an intent to publicly hurt and rehash a narrative in the media,” attorney Bryan Freedman said in a statement. Freedman represents Baldoni, Wayfarer Studios and its representatives.

Freedman pushed back against Lively’s allegations of a coordinated campaign, saying the studio “proactively” hired a crisis manager “due to the multiple demands and threats made by Ms. Lively during production.” He said Lively threatened to not appear on set and not promote the film “if her demands were not met.” Those demands were not specified in the statement.

“I hope that my legal action helps pull back the curtain on these sinister retaliatory tactics to harm people who speak up about misconduct and helps protect others who may be targeted,” Lively said in a statement to the Times. A representative for Lively referred the AP to the Times report, in which Lively denied planting or spreading negative information about Baldoni or the studio.

“It Ends With Us,” an adaptation of Colleen Hoover’s bestselling 2016 novel, was released in August, exceeding box office expectations with a $50 million debut. But the movie’s release was shrouded by speculation over discord between the lead pair. Baldoni took a backseat in promoting the film while Lively took centerstage along with Reynolds, who was on the press circuit for “Deadpool & Wolverine” at the same time.

Baldoni — who starred in the telenovela send-up “Jane the Virgin,” directed “Five Feet Apart” and wrote “Man Enough,” a book pushing back against traditional notions of masculinity — did respond to concerns that the film romanticized domestic violence, telling the AP at the time that critics were “absolutely entitled to that opinion.”

“If anybody has had that real-life experience, I can imagine how hard it would be to imagine their experience being in a romance novel,” he said. “To them, I would just offer that we were very intentional in the making of this movie.”