The Bruins were outshot, down two goals and running out of time. They won anyway. Elias Lindholm scored 2:32 into overtime and Boston rallied to beat the Chicago Blackhawks 5-4 Saturday afternoon at TD Garden, according to NHL.com and The Associated Press.

Lindholm fended off two defenders and tucked a forehand past goalie Arvid Soderblom for the winner. It was Boston’s fifth straight home win and snapped a two-game losing streak.

A late comeback

Chicago took a 3-2 lead on Ryan Greene’s goal at 9:38 of the third period, and Connor Bedard made it 4-2 at 12:20. Mason Lohrei pulled Boston within one at 13:06.

With DiPietro pulled for an extra skater, Morgan Geekie tied it on a one-timer with 12 seconds left. It was his second goal of the season and his first in 10 games, according to the AP.

“It’s huge, and a little bit extra that we won the game,” Geekie said, according to NHL.com. “We really didn’t have our game for two-and-a-half periods, but we were able to find a way to get one and it’s really good for us.”

Pastrnak passes Bergeron

Pastrnak tied the game 1-1 at 13:05 of the first period, chipping a breakaway over Soderblom’s glove after a backhand stretch pass from Pavel Zacha. It was the 428th goal of his career, all with Boston, moving him past former linemate Patrice Bergeron into sole possession of third on the team’s all-time list. Only Johnny Bucyk (545) and Phil Esposito (459) have more.

“He’s having his (Hall of Fame) night next week,” Pastrnak said of Bergeron. “Obviously, I’m honored and blessed that he’s my friend and I’m very humbled by it.”

“Doing that with one franchise, especially a franchise like the Boston Bruins is pretty amazing,” coach Marco Sturm said. “It just shows you what kind of player he is, and what kind of a goal scorer he is.”

DiPietro holds the door

Michael DiPietro made 37 saves as Boston was outshot 28-13 through two periods. “That was a crazy third,” he said, according to NHL.com. “That shows the character of the group, and the resiliency not only down two, but down two with less than 10 minutes left.”

Anton Frondell scored twice for Chicago, including a power-play goal just 11 seconds after Will Borgen was called for delay of game. Casey Mittelstadt scored Boston’s other goal, tying it 2-2 in the second period after a James Hagens steal. Charlie McAvoy and JJ Peterka each had two assists.

Notes

Chicago’s Patrick Kane picked up his 900th NHL assist on Frondell’s first goal. He is the 21st player in NHL history and the first U.S.-born player to reach the mark, according to NHL.com. The Bruins (10-4-1) improved to 6-1-0 at home and host Vegas on Monday. The Blackhawks (4-9-1) host Colorado on Monday.