Tyler Seguin  set up the game’s first goal with a powerful offensive rush and scored the go-ahead tally as the Bruins avoided their first three-game losing streak of the season with a 4-2 win over the Maple Leafs  Thursday night at TD Garden. Anton Khudobin got the start in net and stopped 25-of-27 shots for the Bruins (15-3-3), who also managed to stay ahead of the surprising Maple Leafs  (15-10-0) in the Northeast Division. Boston has 33 points while the Leafs have 30, with the Bruins enjoying four games in hand on Toronto.
Seguin added his second goal of the night on an empty-net tally with 14.8 seconds left to provide the final score.
Before getting on the board first, the Bruins had several chances in close on Leafs goalie Ben Scrivens. Chris Kelly  was denied on a backhander in front. The puck bounced out to Rich Peverley , who couldn’t control the loose puck to put it into the open net. Jay Pandolfo also had a chance on the same shift but was stopped by Scrivens.
It was Pandolfo’s first game filling in on the third line, as Chris Bourque was placed on waivers earlier in the day. The Bruins and Leafs appeared to be headed for a scoreless first period when Seguin picked up a loose puck in front of the Toronto bench and split two defenders. He skated in on Scrivens, who made the initial stop but couldn’t contain the rebound. Patrice Bergeron  was there to put in the rebound between the legs on a backhander to give the Bruins a 1-0 lead with 52.3 seconds left in the first.
The Bruins led after 20 minutes, extending their shutout streak over the Leafs to 146 minutes, 47 seconds, which spanned a pair of shutout wins last season and on Feb. 2. The Leafs finally broke through when David Krejci  lost a puck in the offensive zone, leading to an odd-man break on a 4-on-4 situation. Nazem Kadri finished off the rush with his 11th goal of the season at 2:32 of the second, ending the shutout streak at 149 minutes, 19 seconds.
But the rest of the second period belonged to the Bruins. Bergeron took control of the puck in the neutral zone and fed Brad Marchand  down the left wing. Marchand found Seguin rushing down the right wing and fed him with a circle-to-circle pass. Seguin beat Scrivens for a 2-1 lead at 7:11 for the go-ahead tally. Over the last nine games, the Marchand-Bergeron-Seguin line has 13 goals and 22 assists for 35 points, with 15 of those points coming in last three games.
Khudobin was big several times in the first and second period, including pad saves on Tyler Bozak in each period.
The Bruins made it 3-1 when the Krejci line finally broke through. Andrew Ference  fired a shot from the high slot. Scrivens couldn’t contain the rebound and Krejci was there with the backhander into the open net for a two-goal lead after 40 minutes.
The Leafs made it a one-goal game when Mikhail Grabovski skated to the middle of the left circle and fired a shot through a screen that Khudobin never saw until it was past him and in the net with 5:08 left in regulation. The Bruins had a great chance in the final two minutes to restore their two-goal lead but Scrivens stopped a Bergeron slap shot in close before Seguin’s second goal of the night.
The Bruins helped their cause by killing off all three Toronto power plays, including a brief 5-on-3 in the first period. The Bruins have killed off 79-of-86 penalties this season, good for an NHL-best 91.8 percent rate.
The Bruins are off Friday before hosting the Flyers Saturday afternoon at TD Garden. For more from DJ Bean, Mike Petraglia and the WEEI.com team at the Garden, visit the Bruins team page at weei.com/bruins .