The Writers Guild of America reached a tentative deal with the Hollywood studios and networks to avoid its members going on strike.

The deal was reached early Tuesday, hours after the current contract between the guild and the Alliance of Motion Picture and Television Producers expired. Last week the guild’s members had authorized a strike in the event a new contract was not in place.

In a letter to its members posted at the guild website, the negotiating committee said the new three-year contract includes a 15 percent increase in pay television residuals, $15 million in increases in high-budget subscription video on demand residuals, residuals for comedy-variety writers in pay television and job protection for parental leave.

There is also an increase to the guild’s health plan that will ensure it remains solvent for years to come. The guild had projected deficits in the plan over the next four years.

“Did we get everything we wanted? No. Everything we deserve? Certainly not,” the letter said. “But because we had the near-unanimous backing of you and your fellow writers, we were able to achieve a deal that will net this Guild’s members $130 million more, over the life of the contract, than the pattern we were expected to accept.”

The guild last went on strike in November 2007 for more than three months. During that work stoppage one of the main issues was compensation to writers on content distributed by streaming to computers and mobile devices.