BOSTON — David Krejci scored for the fifth time in the last five games and Boston won consecutive games for the first time in almost two months with a 3-1 victory against the Buffalo Sabres on Thursday night.

Defenseman Johnny Boychuk broke a 1-1 tie at 12:56 of the third period and Krejci scored 2:58 later to make it 3-1.

The Bruins, who won at Toronto Tuesday night, last won two in a row since Jan. 10 and 12.

The loss was the second in the last three games for the Sabres, who are battling for a playoff spot in the Eastern Conference.

Buffalo’s Jason Pominville scored in the first period and Boston’s Gregory Campbell tied it in the second.

Tim Thomas made 18 saves for Boston.

With the game tied 1-1, Boychuk stepped into a loose puck after a sliding Jordon Leopold broke up Jordan Caron pass. Boychuk blasted his fourth goal of the season past Buffalo goalie Jhonas Enroth, making his first start since Feb. 16.

Caron’s assist on the goal gave him six points in his last three games.

Krejci has been Boston’s best scorer since joining a line with wingers Tyler Seguin and Milan Lucic. All three players have at least one point in each of the five games and the line has 20 points (10 goals). It was Krejci’s sixth goal in the last seven games, his 18th of the season.

Pominville walked down the right side on a 2-on-1 but Thomas had a clear view of his slap shot the hit the top of the net. It was the 25th goal of the season for Buffalo captain, the third time in his career he has scored 25, but the first time since 2007-08.

The Bruins ran up a 13-6 shots advantage in the first period but didn’t score until the final minutes of the second.

Christian Ehrhoff’s pass in the defensive zone hit the skate of teammate Cody Hodgson and headed out to the blue line. Shawn Thornton stepped right into the puck and his shot was deflected out of mid-air by Campbell and Enroth at 18:09.

The goal was reviewed but stood. For Campbell, it was his seventh goal of the season, first in 20 games.

It came just over five minutes after a shot by defenseman Dennis Seidenberg, beat Enroth and slammed off the goal post to Enroth’s left. It came right out into the crease and the goalie covered it with his glove.

NOTES: New Boston backup goalie Mary Turco, who cleared waivers to return to the NHL Wednesday, dressed as Thomas’ backup. Turco was signed for the rest of the season because of the injury to Tuukka Rask, but is ineligible for the playoffs because he was signed after the trade deadline. . The Bruins, who recalled forward Max Sauve on an emergency basis in case Benoit Pouliot couldn’t play Thursday night, sent Sauve back to Providence before the game, as Pouliot (lower body) was able to play. .. Boston was still without defenseman Andrew Ference (lower body), left wing Daniel Paille (upper body) and right wings Rich Peverley (knee) and Nathan Horton (concussion). Buffalo was missing Jochen Hecht (concussion), center Cody McCormick (upper body) and defenseman Andrej Sekera (flu). . The Bruins wished a happy 94th birthday to former Bruins coach Milt Schmidt.

Devils 5, Islanders 1

NEWARK, N.J. — Ilya Kovalchuk scored three goals to record his second hat trick in just over three weeks to lead the New Jersey Devils to a 5-1 victory over the New York Islanders on Thursday night.

Patrik Elias and David Clarkson also scored and Martin Brodeur made 29 saves as the Devils earned their 38th win, matching last season’s total when they missed the playoffs for the first time since 1996.

Kovalchuk’s linemates, Adam Henrique and Zach Parise, each had two assists, with Parise scoring his 400th NHL point.

Defenseman Andy MacDonald scored for the Islanders, who had a two-game winning streak snapped and taking another hit to their already dim playoff hopes. Evgeni Nabokov stopped 15 shots and lost for the sixth time in 16 games (10-5-1).

The streaky Kovalchuk has a team-high 29 goals, and he appears to be on a run. He scored in an emotional win over the New York Rangers on Tuesday and has four goals in two games after going nine without one.

His final goal at 8:09 of the third period came a little more than a minute after Elias scored off a rebound to give New Jersey a 3-1 lead.

Parise found Kovalchuk between the circles, and the Russian one-timed a shot past Nabokov. He pumped his fists to celebrate as hats started fluttering to the ice.

Kovalchuk staked the Devils to a 2-0 lead with an even-strength goal at 8:07 of the first period and a power-play tally at 3:33 of the second.

Parise set up the first one with a great pass to Kovalchuk at the left side of the net. His initial shot at an open cage missed everything and hit off the end boards, but the puck bounced right back to him, and he lifted a shot over Nabokov.

Kovalchuk’s second goal came 14 seconds after Islanders defenseman Steve Staios was whistled for tripping him. Defenseman Marek Zidlicky slid the puck to Kovalchuk for a shot that he ripped past a defenseless Nabokov.

The Islanders, who outshot the Devils 19-11 in the first two periods, didn’t get on the board until MacDonald scored a fluke goal with 3:39 left in the second. The Islanders broke into the Devils’ zone on a 3-on-2 rush, and MacDonald chased down a loose puck behind the New Jersey net. He fired a shot that hit Brodeur’s right arm and went in. Brodeur immediately looked up at the rafters in disgust.

The Devils blew the game open with three goals in the third.

NOTES: Zidlicky got two points, his first since joining the Devils last month. … The teams have split the first four games of the six-game season series. … Devils F Alexei Ponikarovsky returned to the lineup after missing three games with an undisclosed lower body injury. … The game was the 599th of Nabokov’s career. … MacDonald’s goal snapped a 31-game goal drought.