BOSTON - During their four-game losing streak last week, the Bruins surrendered 20 goals. Their defensive game, among the league's best for the majority of the season, was in a rut.

With their grasp on a playoff spot slipping away, the Black & Gold knew something needed to change - quickly. Three games later, the Bruins appear to have corrected course.

In three consecutive victories - including a 2-0 shutout of the Dallas Stars Thursday night at TD Garden - Boston has allowed just two goals and regained a spot among the Eastern Conference's top eight teams.

CHICAGO — All of a sudden, the Bruins are looking very much like a playoff team.

Playing on the second half of a back-to-back, the B’s went into the United Center for a Sunday matinee against the Chicago Blackhawks, the best team in the Western Conference and the NHL’s gold standard for the better part of a decade, and gutted out a 3-2 victory.

The B’s fifth straight win vaulted them over Toronto and Ottawa for second place in the Atlantic Division for the time being (both teams have two games in hand). With a 6-3 win over Dallas last night, Tampa Bay stayed three points out of the last playoff spot and four behind the Bruins going into tomorrow night’s huge game at the Garden — where the Bruins can lock up a playoff spot with a regulation victory.

BOSTON (AP) — David Pastrnak’s wide postgame grin had much less to do with the two goals he scored than the two points he helped Boston pick up with a 4-0 win over Tampa Bay.

The victory Tuesday night was all the Bruins needed to clinch their first playoff berth since 2014.

‘‘It’s a new feeling. I’m enjoying it a lot,’’ said Pastrnak, who was still a few months out from being drafted the last time the Bruins played a postseason game. ‘‘I think every single guy in this room did his job today and that’s why we got the win.’’

BOSTON (AP) — The Washington Capitals were so dominant this season that they had nothing left to play for with two games left in the NHL schedule.

That’s precisely why the Bruins want to avoid them in the playoffs.

‘‘In retrospect, it’s over and we’re through it,’’ Boston forward David Backes said after finishing the regular season with back-to-back losses, falling 3-1 to the Capitals on Saturday to set up a potential first-round matchup with Washington. ‘‘We did what we could through 82 games, and we can’t change it now.’’

It's official: the Boston Bruins will face the Ottawa Senators in the first round of the 2017 Stanley Cup Playoffs.

The Bruins will start out on the road, landing in third place in the Atlantic Division while Ottawa will take second and earn home ice. The schedule for the series has not yet been released.

While the Bruins finished tied with the Toronto Maple Leafs in points, the Bruins held the tiebreaker - regulation and overtime wins - over the Leafs after Toronto's regulation loss to Columbus in Sunday's regular-season finale.

BOSTON -- With two top defensemen likely out heading into the Stanley Cup playoffs, the Boston Bruins signed Charlie McAvoy out of Boston University on Monday.

General manager Don Sweeney said that defenseman Torey Krug likely won't play in Game 1 against the Ottawa Senators on Wednesday. He suffered a lower-body injury against the Senators on Thursday and was seen using crutches Saturday.

Rookie blueliner Brandon Carlo is definitely out Wednesday, Sweeney said. He suffered an upper-body injury during the regular-season finale against the Washington Capitals on Saturday and was listed as day-to-day.

OTTAWA — Interim coach Bruce Cassidy’s favorite buzzword since taking over the Bruins has been resiliency.

Last night at Canadian Tire Centre, the B’s needed all they could muster and were able to squeeze out a come-from-behind 2-1 victory over the Ottawa Senators in Game 1 of the first-round playoff series.

Before the game began, they learned that their second line center, David Krejci, was unable to play because of an upper body injury. Then, for the third straight game, the B’s were down to five defenseman when Colin Miller took a leg check from Mark Borowiecki. And in the second period, the B’s simply looked lost, unable to muster a single shot on net. In the end, it didn’t matter.

Playoff hockey returned to the Garden last night in all its riveting glory and — in the end for the Bruins — maddening injustice.

The Bruins spotted the Ottawa Senators the first three goals of the game, then came roaring back to tie it with three goals of their own in the second period. The B’s had several chances to score the go-ahead goal in the third period, but goalie Craig Anderson got the Senators to overtime and, after a stunning roughing penalty was called on Riley Nash, Bobby Ryan scored the game-winner at 5:43 for a 4-3 Ottawa victory and a 2-1 lead in the Eastern Conference first-round series.

“Demoralizing and disappointing. I think you guys summed it up. There’s probably a lot more words, but they called it,” interim coach Bruce Cassidy said. “Once they call it, it’s our job to kill it.”

BOSTON — The Boston Bruins have been pushed to the brink of elimination.

The Ottawa Senators emerged victorious in Game 4 of their first-round Stanley Cup playoff series against the B’s on Wednesday night at TD Garden thanks to a third-period goal from forward Bobby Ryan. Ryan also scored the overtime winner in Game 3.

The Senators now lead the series 3-1 and can end the Bruins’ season with a Game 5 victory in Ottawa on Friday night.