Fans rejoice! The Simpsons, the longest-running primetime comedy in TV history, has been saved from cancellation- at least for another two seasons.

A contract dispute between the show's regular voice actors had threatened to end the series at season 23. However, on Friday, the animated series was renewed through seasons 24 and 25.

Fox has renewed 'The Simpsons,' the longest-running comedy in television history, for an incredible 24th and 25th season, bringing the series total to an astonishing 559 episodes, Fox said in a press release on Friday.

The dispute spilled out into the public as fans worried that Homer may utter his final d'oh.

The pay-cut ultimatum came last Monday as Fox rejected the actors' proposal (offered the previous week) to take a roughly 30 percent pay cut in exchange for a small percentage of the show's huge back-end profits from syndication around the globe, merchandising, and other paraphernalia.

Last Tuesday, the show's producer said that The Simpsons could not continue under its current financial model.

20th Century Fox Television, the studio that produces The Simpsons, asked the voice actors (including Hank Azaria, Dan Castellaneta, Julie Kavner, Yeardley Smith, Harry Shearer, and Nancy Cartwright) to take a 45 percent pay cut to renew their contracts. That would bring their roughly $8 million-per-season salaries down to just over $4 million for roughly 22 weeks of work each season, according to The Daily Beast.

Twenty-three seasons in, 'The Simpsons' is as creatively vibrant as ever and beloved by millions around the world. We believe this brilliant series can and should continue, but we cannot produce future seasons under its current financial model, 20th Century Fox Television said in a statement. We are hopeful that we can reach an agreement with the voice cast that allows 'The Simpsons' to go on entertaining audiences with original episodes for many years to come.

While the terms of the cast's new deal were not announced, The Hollywood Reporter, citing unidentified sources, said that the actors accepted a 30 percent pay cut for each of the 22 episodes per season.

They will not, however, get any cuts of the lucrative back-end profits from nearly a quarter-century of work, as requested.

Before the announcement was made Friday night, cast member Harry Shearer went public with a lengthy statement.

If pay cuts are what it will take to keep the show on the air, then cut my pay, Shearer wrote. In fact, to make it as easy as possible for Fox to keep new episodes of 'The Simpsons' coming, I'm willing to let them cut my salary not just 45 percent but more than 70 percent-down to half of what they said they would be willing to pay us. All I would ask in return is that I be allowed a small share of the eventual profits.

The actors have argued over the years that they deserve a small chunk of the syndication and merchandising profits for contributing creatively to the success of The Simpsons. James L. Brooks and Matt Groening, the show's creators, do reap the benefits of the show's back-end revenue and will continue to get richer off of second round syndication once new episodes are no longer aired.

There are nearly 500 episodes of The Simpsons, and the show is destined to live a long afterlife in syndication. As it stands, the show's voice actors will receive little more than their union-mandated residuals once production ends.

Fox and the show's voice actors have had tense negotiations before. Over a decade ago, the studio warned that it would replace the actors with sound-alikes before they eventually reached a deal.

The show, which follows the satiric adventures of a working class family in the misfit city of Springfield, is a multibillion-dollar cash cow for 20th Century Fox Television. Though ratings have fallen since the show's inception in 1989, The Simpsons remains the anchor of Fox's Sunday block of animation.