LOS ANGELES -- Screenwriters waited Monday to learn what their five-month strike won and prepared for a possible return to work after their union reached an agreement with studio executives that could help end the walkouts that brought Hollywood to a standstill.

The historic shutdown will go on for now, with actors remaining on strike and no talks planned, though the tentative deal announced Sunday night may provide momentum that could lead to a resolution for them too. That would allow full production to resume for the first time since May.

The governing boards of the two branches of the Writers Guild of America are likely to vote on the contract Tuesday. With their approval, writers will then vote on the deal, and the strike can officially end. Network shows including NBC's "The Tonight Show Starring Jimmy Fallon" and ABC's "Jimmy Kimmel Live!" could return to the air within days.

Details of the agreement have not yet been made public or even shared with the writers themselves because the contract language is being finalized. But the WGA said in an email to members that the deal was "exceptional -- with meaningful gains and protections for writers in every sector of the membership."

The 11,500 screenwriters walked off the job May 2 over issues of pay, the size of writing staffs and control of the use of artificial intelligence in scripts.

"It's been a long, hard-fought victory," John August, a writer on films including "Charlie and the Chocolate Factory" who is also a member of the negotiating committee, said on his podcast, choking up as he spoke. "But it's nice to be near the end."

Writer and guild member Zayd Dohrn said many lives were upended during the strike and will now be changing again, but they're used to it.

"It's not that unusual for writers and actors to suddenly have to drop everything and go to work," Dohrn told The Associated Press. "Routines will have to be broken or changed. But I think people are pretty used to being ready to go on short notice."

Union leaders told writers not to return to work yet, but picketing will be suspended. They encouraged writers to join the actors on their picket lines in solidarity.

The three-year contract agreement emerged after five marathon days of renewed talks by the WGA and negotiators from the Alliance of Motion Picture and Television Producers, which represents studios, streaming services and production companies in the negotiations. Chief executives including Disney's Bob Iger and Netflix's Ted Sarandos took part in the talks directly.

Media and entertainment companies got a small boost from the news. Shares in Warner Bros. Discovery, Paramount, Disney and Netflix all rose about 2% or less on Monday.

The agreement came just five days before the strike would have become the longest in the guild's history and the longest Hollywood strike more than 70 years. When an agreement was reached in the last writers strike, in 2008, more than 90 percent of members voted to approve it.

The Screen Actors Guild-American Federation of Television and Radio Artists said its leaders will look closely at the deal struck by writers, who walked out over many of the same issues as actors.

The actors union said the guild continues to urge executives "to return to the table and make the fair deal that our members deserve and demand."

The writers' deal was reached without the intervention of federal mediators or other government officials, which was necessary in previous strikes.

President Joe Biden said the agreement was "testament to the power of collective bargaining."

"There simply is no substitute for employers and employees coming together to negotiate in good faith toward an agreement that makes a business stronger and secures the pay, benefits and dignity that workers deserve," Biden said Monday in a statement.

Los Angeles Mayor Karen Bass and California Gov. Gavin Newsom congratulated the two sides on the deal and expressed hopes that the industry could return to normal soon.

The writers strike immediately sent late-night talk shows and "Saturday Night Live" on hiatus. Dozens of scripted shows and other productions have been in limbo, including forthcoming seasons of Netflix's "Stranger Things," HBO's "The Last of Us," and ABC's "Abbot Elementary." Films including "Deadpool 3" and "Superman: Legacy" were also held up. The Emmy Awards were pushed from September to January.

More recently, writers had been targeting talk shows that were working around strike rules to return to air, including " The Drew Barrymore Show," " Real Time With Bill Maher " and "The Talk." All reversed course in the face of picketing and pressure, and are likely to quickly return now.

The combined strikes made for a pivotal moment in Hollywood as creative labor faced off against executives in a business transformed by technology, from the seismic shift to streaming in recent years to the potentially paradigm-shifting emergence of AI in the years to come.

Screenwriters have traditionally gone on strike more than any other segment of the industry, but they enjoyed a relatively long stretch of labor peace until last spring, when negotiations for a new contract fell apart. The walkout was their first since 2007 and their longest since 1988.

On July 14, they got a dose of solidarity and star power -- along with a lot of new picketing partners -- when they were joined by 65,000 film and television actors.

It was the first time the two groups had been on strike together since 1960.

------

Associated Press Writer Alicia Rancilio contributed from New York.