BOSTON — Denver scored five straight third-period goals to capture the NCAA Division I men’s hockey championship with a 5-1 victory over Minnesota State at TD Garden on Saturday night.

It’s the ninth title in program history for the Pioneers, tying Michigan’s NCAA record for the most ever. Denver had eliminated the Wolverines in the semifinals of the Frozen Four to advance to the title game against the Mavericks.

“It certainly was a goal to get to nine,” said Denver coach David Carle. “The ultimate goal is to be the first one to 10, I will tell you. Winning Thursday against Michigan was a huge step in that direction, and obviously tonight is an even bigger step.”

Senior forward Ryan Barrow and sophomore defenseman Mike Benning scored 2 minutes, 47 seconds apart in the third period to erase Minnesota State’s 1-0 lead, finally breaking through against a stingy Mavericks defense in front of Hobey Baker Award-winning goalie Dryden McKay.

“I kinda blacked out. I just saw my teammates coming towards me and I had to [celebrate],” Benning said of his game-winning goal. “I thought I owed it to my teammates after taking that penalty.”

Denver goalie Magnus Chrona, a San Jose Sharks prospect, made 24 saves in the victory.

“Did our guy have to make some saves? Absolutely. We utilized our goaltender to the extreme,” said Carle. “Sometimes it takes all 60 minutes, and we utilized the last 20 to our fullest advantage.”

In the first period, Minnesota State struck first on the power play, with Benning in the box for tripping Andy Carroll. Junior forward Brendan Furry launched a shot from the left wing that Chrona kicked to the slot. The puck went through the legs of a Pioneers penalty killer to Mavericks winger Lucas Sowder, who made a quick pass to junior forward Sam Morton. With his momentum taking him backward as he shot the puck, Morton’s one-timer found the back of the net with 6:01 remaining in the first period.

The Mavericks would kill off a Denver power play and outshot them 8-3 in the opening frame. Minnesota State held an 18-8 advantage after two periods.

“We just said, ‘Stick with it.’ We didn’t get here by shying award from challenges,” Carle said. “It took everybody to do what we did in the third period there.”

Denver finally broke through against McKay and the Minnesota State defense with 15:14 left in regulation. Freshman Jack Devine took a shot on right wing that McKay stopped with his pad, but senior winger Ryan Barrow was standing on his doorstep to deposit the puck into the net for the 1-1 tie.

Morton took a tripping penalty 40 seconds later, putting Denver on the power play. Just seven seconds after that power play ended, Benning blasted a one-timer on a pass from defenseman Shai Buium for the 2-1 lead, as Minnesota State watched its advantage suddenly evaporate.

“Once we gave up the first one, I thought we started leaking oil a little bit. Couldn’t stop the bleeding. We started chasing the game,” said Minnesota State coach Mike Hastings.

Denver nearly made it 3-1, but the referees waived off a goal for incidental contact with McKay. But the Pioneers would put the game away with 6:26 left in the third period as freshman center Massimo Rizzo converted a 2-on-1 pass from freshman winger Carter Mazur. Forward Brett Stapley and Wright added empty-net goals for the 5-1 final score.

Minnesota State made the Frozen Four for the first time last year, losing to St. Cloud State in the semifinals. This year, they ousted rival Minnesota with a 5-1 win in the semifinals Thursday before falling to Denver in the national title game.

The loss likely marks the end of a remarkable college career for McKay. The 24-year-old set NCAA records with 37 wins and 34 shutouts this season for the Mavericks, becoming just the third goaltender to win the Hobey Baker and the first since former NHL goalie Ryan Miller in 2001.

Interestingly, McKay did not win the Mike Richter Award as the nation’s top goaltender, which went to Buffalo Sabres prospect Devon Levi of Northeastern. McKay went undrafted by NHL teams and is a free agent. He has one more season of eligibility left at Minnesota State but has indicated he doesn’t intend to return for another NCAA campaign.

“I gave up a bad rebound on the first [goal] and they capitalized,” said McKay. “It would have been nice to make a few more saves for the guys. It just didn’t happen.”

The Pioneers had last made the championship game in 2017, which was the last time they won the title. Carle took over from Jim Montgomery after that championship. At 32 years old, Carle becomes the fourth-youngest head coach to win a men’s hockey national championship.