The cast of How I Met Your Mother has known how the series was going to end since the show's beginning back in 2005.
Producers revealed the end of the story to stars Josh Radnor and Lyndsy Fonseca, who play star Josh Radnor's children on the series, when scenes for the end of the series were shot at the beginning in order to ensure that the series came full circle.
"(Creators) Carter (Bays) and Craig (Thomas), are so smart. They had actually planned the ending during our pilot," says star Cobie Smulders, who plays Radnor's love interest on the show. "They shot some scenes with the two children (Henrie and Fonseca) - we shot it with them when they were teenagers and now they're in their mid-20s - we shot this whole scene with them.
"It's kind of amazing that it's been nine years and it's come full-circle and they (Bays and Thomas) have been allowed to see their vision through."
It wasn't easy keeping the ending secret though, says Henrie.
"I'm 24 now, but when I turned 21 I started going out with my buddies. Everyone was always asking me, 'Dude, who's the mom? Who's the mom?'" the actor told Yahoo's The Insider. "People would try and bribe me with all sorts of alcohol, but I kept silent. I didn't tell anyone. I didn't even tell my mother."
The show aired its final episode Monday night.