Zdeno Chara snapped a 20-game goal drought and the Boston Bruins ended a season-long five-game losing streak with a 3-1 victory over the Toronto Maple Leafs on Saturday night.

The win created some much-needed space in the Eastern Conference playoff race for Boston, currently third in the Atlantic Division with 88 points and now three points up on Detroit.

Patrice Bergeron and Matt Beleskey also scored for the Bruins. Ben Smith found the back of the net for the Leafs.

Tuukka Rask made 25 saves, topping Jonathan Bernier, who gave up two goals on 32 shots.

Though still last in the NHL, the Leafs entered the night with three straight wins and victories in six of their previous eight.

In the first period, while fighting off Bruins defender Joe Morrow, Colin Greening gained control of the puck from a spot along the wall in the Bruins zone. He fired through traffic with a shot that was tipped by Smith, and the change in direction was enough to fool Rask, who allowed 10 goals over his previous four appearances.

Smith, on an expiring contract Toronto landed in a swap with San Jose, has five points in his last six games.

Both Rask and Bernier were sharp in the early going.

Rask poke-checked a breakaway attempt by Leafs forward Brooks Laich at one point, and Bernier was equally sturdy with a right pad save on David Krecji after he burst past 19-year-old William Nylander in the Toronto zone.

The 27-year-old Bernier has been rolling recently for the Leafs, stopping 115 of 120 shots in his previous four starts (.958 save percentage).

Boston beat him twice in a dominant second period while outshooting Toronto 11-5.

The Bruins broke a five-game power-play goal drought to even the score at one. Torey Krug's shot from the left faceoff circle was stopped, but the rebound was cleaned up by Bergeron for his team-leading 24th power-play point this season. The goal also snapped an eight-game drought for the 30-year-old, who has 29 goals on the year.

Krejci's shot from high in the slot spurred an unlikely goal from Chara a few minutes later. Deep in the Toronto zone and zipping across the slot area, Chara pounced on Krejci's rebound, flinging a near no-look backhand shot through Bernier's pads.

It was Chara's first goal since Feb. 13 and ninth this season. Chara has 121 goals since he joined the Bruins in 2006, third-most among NHL defensemen in that span.

Toronto, despite a late push, still has yet to win when trailing after two periods, dropping to 0-27-4 this season.

NOTES: A former Leafs draft pick, Rask improved to 15-3-2 lifetime against Toronto. The Bruins, meanwhile, are now 6-1-2 in their last nine meetings with the Leafs. ... Saturday marked an end to the Leafs' six-game homestand, of which Toronto won four and lost two.