For a while during the first few seasons of “How I Met Your Mother,” which aired its 200th episode last month, it was easy to forget that the show was a network sitcom that had to crank out 20+ episodes per season. Its unique structure and willingness to play with the form made it one of the most enjoyable shows of its kind.

After a while, of course, it began to feel the strain. “How I Met Your Mother” has been on the air now for a whopping nine years, so it’s not surprising that the show hasn’t been able to keep up the novelty and energy that defined its early seasons. At times over the past few years, it’s felt like one giant sitcom cliche. (The coupling of Barney and Robin is perhaps the biggest example; it goes against everything both characters stood for early on in an attempt to arrive at a classically happy ending for the core quintet.)

Part of that laziness has crept into its ninth and final season, too. I was never opposed to setting this current season over the weekend of Barney and Robin’s wedding. It meant the show would have to recommit to incorporating flashbacks and flashforwards into the current story, a masterful technique built into the fabric of the show. But in hindsight, too many episodes were a waste of time (thinking particularly of Marshall’s road trip) and the cast’s talent.

As we head into the final two months of the show’s run, though, things are looking up. The past three or four episodes (including the Canadian rehearsal dinner, Marshall meeting the Mother, the fourth slap bet) have been rock solid, a reminder of why we fell in love with the show in the first place. (Viewers seem to agree: Last week’s 200th episode had 10.7 million viewers and a 3.8 rating among adults 18-49, the show’s largest audience since 2011.) We’re confident that, when the show comes to an end March 31, “How I Met Your Mother” will go out on top.

After all, it has a secret weapon: the Mother.

The Jan. 27 episode, “How Your Mother Met Me,” was a showcase for the Mother, played by Cristin Milioti, that told the story of how she met Ted through her perspective. It was hands-down the show’s best episode this season. Unlike many others, it had a purpose, and it managed to weave in beloved allusions to the show’s past while also moving its final plot threads forward. But most importantly, it was able to wring emotion from the notion that Ted and the Mother are destined to end up together, something I seriously doubted the show could still do. That last image, of Ted listening to the Mother sing “La Vie en Rose?” Pass the tissues, please.

The episode was a culmination of the second half of this season, which has only gotten better and better the more it focuses on the Mother and how she integrates into the gang. The best thing the show ever did was cast Milioti, known before this primarily as the Tony-nominated star of Broadway’s “Once.”

The role is a tricky one. The show is called “How I Met Your Mother.” Asking someone to step into the show in its final season in this capacity is a tall order. The wrong person could have easily cheapened Ted’s nine-season quest. But from the beginning, Milioti has imbued the Mother with an I-was-here-all-along confidence that helps the character from turning into a twee mess. As written, the Mother is a little too on the nose, a too-perfect companion for Ted, but Milioti is just so darn likable it’s hard not to root for the two of them. (It helps that she and Josh Radnor have incredible chemistry.)

The only problem I had with the Mother’s showcase last week was that it couldn’t have been an entire season on its own. Here’s to hoping the final eight episodes will continue to make her invaluable to the show’s story. After all, she’s the reason “How I Met Your Mother” is great again.

“How I Met Your Mother” airs 8 p.m. Mondays on CBS. The show’s series finale is March 31.