In a question and answer session on website Reddit.com on Monday, Bays reveals that Spears contacted them about appearing in a critical episode which introduced Stella, an integral love interest for the main character Ted.

Bays wrote, “We got a call… saying that Britney Spears wanted to be on our show. And she specifically wanted to be in the episode Ten Sessions, which sent a chill down our spines, because that’s the one where we meet Stella.

“I immediately imagined Britney playing Stella and had a minor panic attack, because it’s such a big role and needed an (sic) proven, experienced actress like (Scrubs actress) Sarah Chalke. But to her credit, Britney liked the character of Abby, and wanted to play that part. So we said sure!

“And by golly she put our show on the map. It can’t be overstated. Britney Spears rescued us from ever being on the bubble again. Thanks Britney!”