TORONTO - Ron Hainsey scored the winner as the Toronto Maple Leafs edged the Boston Bruins 4-3 on Saturday night at Air Canada Centre.

Hainsey's one-timed a William Nylander pass past Tuuka Rask with 1:23 remaining in regulation for this fourth goal of the season.

The win moves Toronto (39-20-5) ahead of Boston (37-14-8) for the second seed in the Atlantic Division by a single point. However, the Bruins have five games in hand on the Maple Leafs.

The Maple Leafs also matched their franchise-best home win streak at nine games with the victory.

Nazem Kadri netted a pair for Toronto while Mitch Marner added a goal and three assists. Nylander finished with two assists and Frederik Andersen, who entered the game with a 9-1-0 record in 10 career starts against the Bruins, stopped 23 shots.

Brad Marchand scored twice and Jake DeBrusk had the other Bruins goals. Rask made 32 saves. Patrice Bergeron and David Pastrnak each had two assists.