HOLLYWOOD, Calif. (FOX 11 / CNS) - The Writers Guild of America and the Alliance of Motion Picture and Television Producers reached a deal early today on a new film and TV contract, averting what members of the entertainment industry feared would be a crippling writers strike.

"Your Negotiating Committee is pleased to report that we have reached a tentative agreement with the AMPTP that we can recommend for ratification," the WGA said in a statement to its members. "In it, we made gains in minimums across the board -- as well as contribution increases to our Health Plan that should ensure its solvency for years to come."

The statement said the WGA negotiators also obtained higher residual fees, including, "for the first time ever, residuals for comedy-variety writers in Pay TV," as well as, "also for the first time ever, job protection on Parental Leave."

"Did we get everything we wanted?," asked the statement. "No. Everything we deserve? Certainly not. 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 Guilds members $130 million more, over the life of the contract, than the pattern we were expected to accept."

The draft agreement will now go to the WGA West's board and then to gild members for ratification.

Had no agreement been reached -- the WGA's contract expired at midnight -- a strike by the 12,000-strong guild might have started today. "It came right down to the wire," one person close to the talks told the Los Angeles Times. "We didn't get everything we wanted and they didn't get everything they wanted, which is usually the result of a successful negotiation. We made real and substantial gains for writers in a number of areas."

The agreement averts a potentially devastating strike that would have affected production throughout the industry, including about 240,000 people in the Los Angeles area, according to The Times.

The agreement follows weeks of contentious negotiations that included discussions over how much writers should be paid at a time of changes in the entertainment industry. The talks also focused on the guild's generous healthcare plan, which has come under financial strain, the newspaper reported.

Among the items on the bargaining table were the health plan, which faces mounting deficits, as well as increases in pay and streaming residuals to make up for shorter TV seasons. Guild leaders argued that entertainment companies and executives have been raking in money while writers' compensation languishes.

The two sides in the negotiations broke off the talks twice since they began March 13. The guild's membership voted in favor of a strike authorization April 24.

To head off a strike, the alliance increased its offer regarding the WGA's health plan, making a "substantial increase" to the $60 million previously offered, a person familiar with the situation told The Times. The alliance also increased its offers on issues including the length of TV seasons and writer exclusivity. Writers complained they were constrained by exclusivity clauses, preventing many from working on more than one show per season.

Both the WGA and the AMPTP had imposed a media blackout on the negotiations. The last time the WGA waged a strike was in 2007, with a work stoppage that lasted 100 days and brought much of the Hollywood industry to a halt. The action cost the economy of Los Angeles an estimated $2.5 billion. Production halted, income dried up for writers, set decorators, caterers, limo drivers and florists, and TV stations ran loads of reruns.

The Writers Guild walked out for 100 days in 2007-8 and 155 days in 1988. In both cases, the most in-demand writers eventually got tired of losing income and applied pressure to wrap it up.

Longtime Hollywood power players -- agents, studio executives, labor lawyers -- had put the chance of a strike this year at roughly 51 percent, according to The New York Times.