Channel 4 says it was wrong to edit out the word “gay” from an episode of The Simpsons, which was shown by the UK broadcaster last weekend.

According to the Independent, the word was cut from a 1994 episode, called Homer Loves Flanders, which was aired at 12.55pm on Sunday 4 November.

On the way in to an American football game, Homer is embarrassed to be seen with his neighbour, but he softens after Ned pays for food and introduces him to the star quarterback.

As they drive away, passing workmates Lenny and Carl in the car park, Homer proudly yells out of the window: “I want everyone to know that this is Ned Flanders … my friend!’

Lenny turns to Carl and says: “What’d he say?”

Carl replies: “I dunno, somethin’ about being gay.”

The line plays on the perceived sexual chemistry of Lenny and Carl’s relationship, a long-running Simpsons joke.

In Channel 4’s version, the episode cuts to a commercial break before “gay” is mentioned.

In a statement, Channel 4 said it had been over-cautious in its decision to avoid causing possible offence.

A spokesperson said: “We always carefully consider the context in which language is used in our programming. However in this instance the episode was edited in error as neither the word nor the context was unsuitable.”

Earlier on Tuesday, actor Sir Ian McKellen criticised New Zealand Prime Minister John Key after he mocked a radio host for wearing a “gay” red jumper last week.

Sir Ian said the word should not be used in such a “careless” way.