“The Simpsons” Co-creator Sam Simon, who is terminally ill, has agreed to pay the $7,826 (€6,250) to save a gay County Mayo Bull, Benjy, from the slaughterhouse.

Simon, who is dying of cancer, has pledged to give away $100 million of his fortune before his death. He has described his cancer and decision to give to charity as “the most amazing experience of my life."

Both animal rights groups and LGBT groups took up Benjy’s cause when it emerged that because he was failing to breed he would be killed.

The pedigree Charolais bull was useless to the Meath famer, who remains anonymous. The farmer said Benjy preferred other bulls to heifers and was useless to his farm.

Now Simon’s donation, along with the $6,268 (€5,000) donated to the campaign, led by TheGayUK, Benjy the bull will be on his way to a sanctuary by Christmas.

Simon, who is battling colon cancer, is a leading donor to animal welfare causes. He heard about Benjy’s case through the People for the Ethical Treatment of Animals (PETA) pressure group.

He said, “All animals have a dire destiny in the meat trade, but to kill this bull because he's gay would've been a double tragedy.

"It thrills me to help PETA and ARAN (Ireland's Animal Rights Action Network) make Benjy's fate a sanctuary rather than a sandwich."

ARAN campaigns director John Carmody said Simon and other donors were buying the bull "freedom."

He said, “What could be better than to present Benjy with a Christmas gift that will literally last a lifetime, by giving him a one way ticket to freedom.”

Here’s clip on Sam Simon’s illness and charity: