LOS ANGELES (AP) — The screenwriters union and Hollywood studios reached a surprise four-year tentative agreement after roughly three weeks of negotiation.

The Writers Guild of America West said on X that its negotiating committee unanimously approved a tentative agreement with The Alliance of Motion Picture and Television Producers, which represents studios. The alliance confirmed the deal in a separate statement on its website Saturday.

“We look forward to building on this progress as we continue working toward agreements that support long-term industry stability,” read the alliance statement.

The precise terms of the deals were not immediately announced, but it is expected to include several writers’ priorities such as better health care plans and more protections against artificial intelligence. The union said on X that the deal protects the writers’ health plan and builds on gains from 2023 and “helps address free work challenges.”

The contract agreement, a year longer than a typical three-year deal, must be approved by the guild’s board and members before it is ratified.

The surprise agreement came within weeks of negotiation — a stark contrast to the contentious contract negotiation three years ago when Hollywood writers went on a historic strike that partially brought the industry to a standstill.

The writers' tentative deal with studios came as the Writers Guild of America West faces an ongoing strike by its own staff union that started in February. More than 100 employees working in legal, events, and residuals departments have gone on strike, citing allegations of unfair labor practices.

It is not clear how, or whether, the weeks-long strike would have an impact on the tentative deal with the studios. The union announced last month it canceled its annual award ceremony due to the staff union strike.