Cristin Milioti has been cast in How I Met Your Mother in the titular role.

Entertainment Weekly reported the casting as an exclusive on Thursday. Milioti is a 27-year-old New Jersey actress who has made a name for herself on Broadway, films, and television. Carter Bays and Craig Thomas, co-creators of HIMYM, spoke to EW about why the actress was chosen for the coveted role.

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

It also helped that Milioti has a musical background. As fans of the show know, the mother is known to be a member of the band at the nuptials between Barney and Robin. Bays said that Milioti's time on Broadway's Once created a correlation to her HIMYM character. He said there would be a musical component to the character.

"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," Thomas said.

The executives said that the cast had already begun to embrace Milioti. They figured out pretty quickly that she would be cast in the role after doing an on camera audition.

"Neil walked in and looked at her and his eyes widened and he sort of said, 'Oh my God, are you the mother?!' And he gave her this big hug and was like, 'You're the mother!'" Thomas said.