BEFORE Lisa Kudrow found fame as Phoebe Buffay on Friends, she was cast as one of the stars of Frasier - and fired after just one episode.
For a young comic actress trying to make her way in Hollywood, it was a savage blow, and left Kudrow feeling adrift and hopeless.
But the story of how she turned it around has now become a viral video, thanks to an inspiring speech she gave at a graduation ceremony.
The actress, 54, revealed that landing the role of Frasier's producer Roz in the show's pilot had felt like her "shot" - and being fired was "so embarrassing".
"It was really hard to think it wasn't meant to be in my career. Everyone knew it [Frasier] was going to be a hit - and it was," she told the graduates.
"A couple of months later, I was almost completely out of money and a friend - actor Richard Kind - called and said 'I heard what happened - I don't know how you get up in the morning.'"
It was then that Kudrow said she realised she was "coping better" than she was expected to - and soon, her luck turned around.
"When one door closes, another door always opens - that's what I was telling myself to keep those moments of doubt only 'moments'," she said.
"It worked, I kept going, and after many auditions I was the second person cast in the pilot Friends Like Us ... which would later be changed to Friends."
if you're struggling or unhappy with where your life is currently please take a moment to watch this pic.twitter.com/ls0hJIZcXQ— Friends Show Quotes (@quote_friends) September 24, 2017
Jim Burrows, who directed Frasier and the Friends pilot, shared Kudrow's story with the cast one day while they were sharing stories about being sacked from acting gigs.
"He said, 'Well she has the worst one, she got fired from Frasier!'" the actress recalled.
She said he told her: "It's a good thing you did, or you wouldn't have been on this show [Friends].'
"And he was right. And it's a good thing I didn't get Saturday Night Live ... and that the Romy and Michelle pilot didn't work out ... and every other disappointment that happened.
"So thank God I got fired."
Thank God indeed: Friends went on to become one of the most successful sitcoms of all time, lasting ten seasons and catapulting the careers of Kudrow, Jennifer Aniston, Courteney Cox, David Schwimmer, Matt Le Blanc and Matthew Perry.
Update your news preferences and get the latest news delivered to your inbox.