Read CBS’s official synopsis for How I Met Your Mother‘s two-part season 7 finale, “The Magician’s Code.”

In “Part 1,”

MARSHALL AND BARNEY DESPERATELY TRY TO GET BACK TO NEW YORK WHEN LILY GOES INTO LABOR, ON THE FIRST PART OF THE ONE-HOUR SEVENTH SEASON FINALE OF “HOW I MET YOUR MOTHER,” MONDAY, MAY 14

CHEAT TWEET: Lily’s in labor! Will a drunk Marshall make it back in time for the birth? #BarneysBrideUnveiled 5/14 @8PM ET/PT http://bit.ly/I8SYU3

“The Magician’s Code Part One” — While Marshall is in Atlantic City with Barney, Lily goes into labor, leaving him desperate to make it back to New York before the baby is born. Meanwhile, Ted and Robin try to distract Lily during her painful contractions, on the first part of the one-hour seventh season finale of HOW I MET YOUR MOTHER, Monday, May 14 (8:00-8:30 PM, ET/PT) on the CBS Television Network.

Guest stars for this episode include Chris Elliot (Mickey) and Francesca Capaldi (7-year-old Lily).

In the second part of the episode, it’s time for Barney’s wedding!

ON BARNEY’S WEDDING DAY, THE GANG REMINISCES ABOUT WHEN THEY ENCOURAGED TED TO CHASE AFTER THE ONE THAT GOT AWAY, ON THE SECOND PART OF THE ONE-HOUR SEVENTH SEASON FINALE OF “HOW I MET YOUR MOTHER,” AT A SPECIAL TIME, MONDAY, MAY 14

CHEAT TWEET: Barney’s wife is finally revealed and Ted connects with an old flame #BarneysBrideUnveiled 5/14 @8:30PM ET/PT http://bit.ly/IPJF6V

“The Magician’s Code Part Two” — On Barney’s future wedding day, when his wife is finally revealed, the gang reminisces about the time they encouraged Ted to follow his heart and go after the one that got away, on the second part of the one-hour seventh season finale of HOW I MET YOUR MOTHER, Monday, May 14, at a special time (8:30-9:00 PM, ET/PT) on the CBS Television Network.

This episode’s guest stars interestingly include Becki Newton (Quinn) and Frances Conroy (Loretta Stinson).

Both episodes were written by showrunners Carter Bays and Craig Thomas.