Harry Shearer, the voice of key characters on The Simpsons such as Mr. Burns, Ned Flanders and Principal Skinner, says he's leaving the popular Fox series over a contract dispute with his bosses.

Shearer, 71, had performed on the The Simpsons since it was just a cartoon short on The Tracey Ullman Show.

The comedian confirmed his departure on Wednesday, tweeting a message he attributed to a lawyer for the show's executive producer.

"From James L. Brooks' lawyer: 'Show will go on,Harry will not be part of it, wish him the best,'" Shearer tweeted.

In a subsequent tweet, he explained that his departure was "because I wanted what we've always had: the freedom to do other work."

Shearer has charted a diverse career as an actor, writer, musician and producer, both before and since becoming part of the Simpsons troupe.

Also known for his starring role in the 1984 mockumentary classic This Is Spinal Tap, as well as for hosting public radio's weekly Le Show for more than 30 years, he recently produced and starred in Nixon's The One, portraying President Richard Nixon in a TV dramatization of the secret White House tapes.

Characters to live on

Fox recently announced picking up The Simpsons for two more seasons — its 27th and 28th.

Simpsons showrunner, Al Jean, told New York Times reporter Dave Itzkoff that Shearer's characters will go on without him.

"We do not plan to kill off characters like Burns and Flanders," Jean said in a statement, "but [we] will recast with the finest voiceover talent available."

Some fans were so outraged they called for the end of the show.

This is not the first time the network has clashed with cast members over contracts.

Fox threatened to cancel the satirical sitcom in 2011 if the show's lead actors wouldn't accept a pay cut.  

At issue were the salaries paid to Shearer, Dan Castellaneta (Homer, Grampa Simpson, Krusty the Clown, and others), Julie Kavner (Marge Simpson and others), Nancy Cartwright (Bart and others), Yeardley Smith (Lisa) and Hank Azaria (Moe, Chief Wiggum and Apu).

At the time, Shearer said he was willing to cut his salary by 70 per cent to keep the show going, but wanted a share in the production's long-term profits, estimated to be worth billions.

Terms of the deal that saved the show were not revealed.

Other departures

Shearer isn't the first cast member to leave over his contract.

Maggie Roswell, who played Maude Flanders and Helen Lovejoy, among others, quit the show in 1999 after producers wouldn't giver her a raise. 

Her departure resulted in writers killing off Maude, the devout Christian wife of Ned and mother to Rod and Todd, with a T-shirt cannon. 

Roswell eventually returned in 2002 after reaching an agreement with Fox.

marcia-wallace-simpsons

Actor Marcia Wallace, who played the voice of teacher Edna Krabappel on The Simpsons, died in 2013. (Associated Press, Reuters)

The 2013 death of Marcia Wallace, who voiced world-weary teacher Edna Krabappel, forced producers to retire the signature character.

Sam Simon, the show's co-creator, died in March after a battle with colon cancer. He was 59.

With files from The Associated Press