How I Met Your Mother is a phenomenal success in sitcom terms. To get one season is a dream; to get two is teetering on the unthinkable. To get nine – well you’re in ‘Friends’ and Frasier’ territory there, and that’s not bad company to be keeping.

Britney SpearsBritney Spears filming her new perfume ad

But it all could have been so different for the hit show had they not attracted the star power of Britney Spears, who starred back in 2008, providing a welcome boost for the flagging sitcom.

The creators of the show, Carter Bays and Craig Thomas, answered questions on a Reddit AMA – so often the source of a meaty exclusive – and one of those questions induced the power of Britney.

"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,” explained Bays.

"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!” he added.

"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!"

See, Spears boosted ratings at a time when network bosses were deciding whether or not to pick up the show for a fourth season, as viewership had been declining – and as we all know: ratings are pretty much everything!

How I Met Your Mother CastThe How I Met Your Mother cast in all their award-show glory