It took eight long, sometimes excruciating years for viewers to find out the identity of the “mother” on the CBS sitcom “How I Met Your Mother.”

The answer was finally revealed Monday night in the season finale, when actress Cristin Milioti showed her face for a fleeting minute, buying a train ticket to Barney and Robin’s wedding in “Farhampton,” the show’s fanciful, fictitious stand-in for the East Hampton.

Milioti will appear regularly next season, the show’s last, beginning in September.

“Our ninth season will tell the epic story of the longest wedding weekend ever,” says executive producer Carter Bays.

Milioti’s musical abilities were key to clinching the role, as The Mother plays bass in Barney and Robin’s wedding band.

Regular theatergoers might recognize Milioti from her role as “Girl” in the long-running Broadway musical “Once.”

She won a Grammy Award and was nominated for a Tony for her work in that show.

Click here for more show details from The New York Post.