Seinfeld’s 1992 episode “The Contest,” in which Jerry, George, Kramer and Elaine have a competition to see who can last the longest without masturbating, is one of the most iconic episodes of one of television’s most iconic shows. Co-creator Larry David wrote “The Contest,” basing it on a contest in which he’d participated in real life (he won “handily,” he says), and earned an Emmy for his troubles. So it stands to reason that David was prepared to walk right off the Seinfeld set, never to return, if the bigwigs at NBC had looked askance at his creation.

David recalled the episode’s table read in an oral history of “The Contest” published by Vulture:

I remember being nervous because the NBC executives were there. I really had this thing going on in my head where, well, if they don’t like it, I’m just going to quit the show. I really had this built up in my head where, there’s no way they’re going to do it and I’m just going to quit if they don’t do it.

“Larry was going to put his whole job on the line,” Michael Richards recalled. “I’ve known Larry since we did Fridays together, and that’s Larry David. If he believes in something, he’s just going to fight for it.” Of course, we know this well from David’s absurdly stubborn Curb Your Enthusiasm character, who does not believe in free samples, to name just one example.

Fortunately for David and us all, the NBC brass loved “The Contest.” Former NBC president Warren Littlefield was able to successfully lobby the network’s standards and practices unit to clear the episode, mostly by virtue of the fact that the word “masturbation” was never actually uttered in it—a clever work-around that David credits Seinfeld himself for.

As a result, David was able to get his baby to air with minimal changes. “There may have been a couple of things [I had to cut out],” he said. “But nothing I couldn’t live with.” The rest is history: “The Contest” is a stone-cold classic, and David got to continue making Seinfeld one of TV’s best-ever comedies. “I’m grateful to NBC for airing the show when I never thought they would,” said David to conclude Vulture’s oral history. “That was the most surprising thing about it.”

Read Paste’s “The Contest” retrospective right here, find out where the episode falls on our ranking of Seinfeld’s 10 best episodes here, and watch a couple of clips from the episode below.