The Simpsons have farewelled co-creator Sam Simon in the most recent show’s closing credits with a touching tribute calling him “one of the greatest comic minds ever”.

At the end of the episode, which aired on Sunday in the US, a video was shown of Simon talking about “doing stuff that you personally enjoy”, followed by a written message thanking him for his contribution to the show.

The closing of Sunday night’s episode sent social media into a frenzy, with some users saying they were in tears.

Social media reacts to The Simpsons touching tribute (Twitter)

The Simpsons pay touching tribute to Sam Simon at closing credits (Twitter)

The episode aired a day after his funeral which was described as “a perfect mix of laughter and tears” by the Sam Simon Foundation, which he set up to provide food to families in need and service dogs to veterans.

The Simpsons writer Stephanie Gills tweeted, “Sam wins award for best funeral. If only he could accept.”

The Simpsons pay touching tribute to Sam Simon at closing credits (Twitter)

Pamela Anderson also attended saying she was “honoured” and Jennifer Tilly tweeted a picture of his coffin.

The Simpsons pay touching tribute to Sam Simon at closing credits (Twitter)

Simon died last week, aged 59, after a long battle with cancer.

He was diagnosed with colon cancer in 2012 and said at the time he knew the disease was terminal.

His final years were filled with charitable projects, including the donation of millions of dollars to animal rights causes.

Simon died at home surrounded by family and his beloved dog.