It has been an open secret for a while but Waylon Smithers Jr, of the long-running cartoon comedy The Simpsons, is finally coming out as gay.

According to the show’s producer, Smithers, who has unsuccessfully hidden his sexuality for years, will come out to his tyrannical boss Mr Burns during two episodes of this year’s season, which began in the US on Sunday.

“In Springfield now, most people know he’s gay, but obviously Burns doesn’t,” producer Al Jean told TVLine.

“We deal with that in two episodes,” he added.

“We actually do a lot with Smithers this year. He gets fed up with Burns not appreciating him and considers his options.”

Smithers’s infatuation with his billionaire boss has been hinted at in many episodes of the iconic show that began airing in 1989 and is the longest running prime-time sitcom in the US.

The show follows the trials and tribulations of the Simpsons, a dysfunctional family that lives in the fictional town of Springfield.

Mr Burns, the owner of a nuclear plant, is the town’s richest citizen and Smithers is his personal assistant and self-proclaimed best friend.

Smithers’s coming out is in line with changes in recent years in the US television and movie industries, which have reflected more tolerance in society toward gays, lesbians and transgender people.

“The idea of a show that has an openly gay character has ceased to be remarkable,” said Robert Thompson, director of Syracuse University’s Centre for the Study of Popular Television.

Nonetheless, he added, Smithers’s coming out reinforces acceptance of the LGBT community.

“Before the 1970s, we had virtually no gays or lesbians or transgender people on television at all,” he said. “They were virtually invisible.

“And I guess the Smithers story is one more character that demonstrates that is not the case anymore.”