Michael Jackson, shown in 2005, voiced a character in a 1991 episode of "The Simpsons." (Pool/Photographer: Pool/Getty Images)

Nearly three decades ago, Michael Jackson offered to be a guest voice on “The Simpsons.” The result of that collaboration will now be pulled from recirculation.

The top minds behind Fox’s animated show say they were swayed by “Leaving Neverland,” the controversial documentary that began airing on HBO Sunday and alleges child abuse by the late performer.

“Simpsons” executive producer James L. Brooks told the Wall Street Journal that he, creator Matt Groening and showrunner Al Jean jointly decided to pull the 1991 episode, “Stark Raving Dad,” which features Jackson voicing a character in a mental-health ward who believes he is Jackson.

Brooks told the Wall Street Journal that this was “clearly the only choice to make,” adding that he, Groening and Jean were “of one mind on this.”

In “Stark Raving Dad,” which kicked off the series’s third season, Homer Simpson is a patient at the mental-health ward when he meets a man named Leon Kompowsky, whose spoken lines are voiced by Jackson, who was originally credited as “John Jay Smith” (musician-songwriter Kipp Lennon voiced the character’s singing). It wasn’t until this past fall that Groening confirmed the character was voiced by Jackson. The episode was directed by Rich Moore, who would go on to direct “Zootopia” and “Ralph Breaks the Internet.”

Brooks, who called it a “treasured episode,” said that “Stark Raving Dad” would be pulled from streaming platforms and future box sets, as well as broadcast network reruns. Representatives at Fox have declined to comment.

In “Leaving Neverland,” Wade Robson and James Safechuck, two men who first met Jackson as children, allege that the pop performer sexually abused them in the ‘90s. Jackson’s family has denied the allegations, and his estate sued HBO last month, alleging that airing the documentary violates a 1992 concert-special contract with the cable channel over disparagement of the singer.

Robson testified in defense of Jackson at a 2005 child molestation trial, and both boys gave sworn witness statements supporting Jackson in response to the 1993 allegations. But each one later sued the Jackson estate, at different times — both of their cases were dismissed because too much time had passed.

Jackson, who was acquitted in the 2005 molestation case, died in 2009.

Since his death, his estate was able to tackle massive debts and make deals to grow a $2 billion empire, including a Las Vegas tribute spectacle and planned Broadway musical.

Since “Leaving Neverland” aired, hundreds of radio stations, including in Canada and New Zealand, have decided to stop playing Jackson’s music.

Read more:

How ‘Leaving Neverland’ puts Michael Jackson’s cultural legacy and $2 billion empire in jeopardy