A writers strike is coming to an end after union leaders landed a tentative agreement with Hollywood studios to hash out residuals, staffing arrangements, and strong limitations on artificial intelligence after five months of industrial action.

At the start of May, thousands of Hollywood stars and writers took to the streets to protest unjust working conditions and the looming threat of AI being used to effectively displace workers in writers rooms.

Under labour union the Writers Guild of America (WGA), droves of writers for film and television joined up for a work-hiatus effort following failed negotiations with studios and streaming platforms such as Netflix, Amazon, Apple, Disney, Discovery-Warner, NBC Universal, Paramount and Sony – all represented by the Alliance of Motion Picture and Television Producers (AMPTP).

On Sunday, after five days of renewed negotiations, the WGA has announced a long-awaited deal with the AMPTP sporting largely favourable outcomes for the writers’ union that included improved terms for screenwriter employment, increased streaming residuals, and regulations for the use of artificial intelligence on projects covered by the union’s Minimum Basic Agreement (MBA).

“The WGA reached a tentative agreement with the AMPTP,” said the Writers Guild of America West on Wednesday.

“Our Negotiating Committee, WGAW Board, and WGAE Council all voted unanimously to recommend the agreement. The strike ends at 12:01 am.”

In a three-year contract agreement, the WGA secured measures to prevent AI from writing or rewriting literary material (such as scripts, plots or screenplays), as well as stipulations to prevent companies from requiring writers to use AI software (such as ChatGPT) when performing writing services.

Furthermore, the deal allows writers the right to choose to use AI (if a hiring company consents), and further dictates writers must be informed when provided materials are generated by AI or incorporate AI-generated material.

One of the more prominent concerns for AI technology is how companies have used the material of creatives – regardless of copyright status – to train their AI solutions.

The WGA further managed to reserve the right to assert that “exploitation of writers’ material to train AI” is prohibited by MBA or other law.

The victory is particularly notable given many of the initial proposals raised by the WGA were at first refused.

Before the strike began, the WGA posited regulation of artificial intelligence only to be rejected by the AMPTP with a measly counter offer of running annual meetings to “discuss advancements in technology.”

Other proposals, such as staff being guaranteed at least 10 consecutive weeks of work and arrangements for weekly pay, had been knocked back without counter offer.

Now, after strikers caused endless delays for dozens of scripted shows and productions, the AMPTP is rejecting only one of the WGA’s proposals – down from an initial nine.

“These are essential protections that the companies told us, to our faces, that they would never give us,” said Adam Conover, creator of popular Netflix series ‘the G Word’.

“But because of our solidarity, because they literally cannot make a dollar without us, they bent, then broke, and gave us what we deserve.

“We didn't win everything, but we tripled what they offered before the strike.”

While Hollywood writers are preparing for their return to work, striking actors are still awaiting talks to secure a deal of their own.