After eight long seasons, we finally got to see who the mother is in How I Met Your Mother.

The producers managed to keep the casting a secret up until the episode, titled “Something New,” aired at 8 p.m. on CBS. This was the final episode before the start of the ninth season, which will be the show’s last. Since the episode revealed who the mother is, we can expect that season nine will explain how Ted Mosby (Josh Radnor) met and the mother of his children.

Creators Carter Bays and Craig Thomas told Entertainment Weekly how they found the perfect actress for the role. She is Cristin Milioti, 27, a Tony nominated actress who starred on Broadway in Once. She’s also made appearances on The Sopranos and The Good Wife and also landed a memorable role on 30 Rock.

“It was exciting,” Bays told EW about the casting process. “Part of what helped us is our casting director Marisa [Ross], she sort of has been talking about Cristin for two years now. It helped that she turned us onto her and then the more we got to know Cristin and see her work, the more we realized, Yeah, she’s the right choice. So that definitely helped, because we didn’t want to do a big casting cattle call — we were going to make it ‘come audition for Barney’s cousin’ or something.”

Milioti’s connection to musicals was key as well, since we know that Ted’s wife played at Barney and Robin’s wedding. “Last season, we flashed forward to a little glimpse of her playing bass in that band and that was before we had cast Cristin, so you just sort of saw a face and a shoulder, but we love the idea. For anyone that has gone and seen Once — she’s not in it anymore, obviously — but she has an amazing voice. She’s an amazing musician,” Thomas said.

Ted didn’t actually see Milioti in the episode. Only the audience caught a glimpse of her at the very last second. According to THR, Thomas and Bays have said in past interviews that the final season will have a different structure from the past eight years, so that makes waiting for the fall premiere even harder.

Here’s the reveal:

image: YouTube/CBS