SUNRISE — The Panthers got much-needed reinforcements from previously injured players, and those players helped Florida snap a four-game losing streak and pick up a crucial, 5-4, shootout victory over Boston at Amerant Bank Arena on Wednesday night.

Despite surrendering a two-goal lead in the third period, the Panthers got the edge in the shootout and notched two points, moving ahead of Ottawa in the Atlantic Division. Florida is one point behind Toronto and seven behind the Bruins. Florida has one more game — a road contest against rival Tampa Bay on Thursday — before the Olympic break.

Sam Bennett, Anton Lundell and Brad Marchand all returned to the ice on Wednesday. Bennett left Monday’s loss to the Sabres with an injury, Lundell had missed two games with an upper-body injury and Marchand had missed two games with an undisclosed injury.

Marchand scored the winning goal in the shootout.

Bennett appeared to score early, but the goal was overturned on a coach’s challenge. The Panthers did get on the board with 15:38 left in the first period; Eetu Luostarinen corralled a turnover from Boston forward Morgan Geekie and fired it past goalie Joonas Karpisalo (who will be Luostarinen’s teammate on the Finnish Olympic team).

But Florida’s lead did not last long. Boston winger Michael Eyssimlont had a clear path to the goal when Brad Marchand and Uvis Balinskis collided on defense, and the Bruins forward buried his chance.

Even a power play came back to bite the Panthers. Florida could not convert on several chances with a man advantage, and when Eyssimlont came out of the penalty box, he found empty space behind the Panthers’ defense, received a pass and scored on a breakaway to put Boston ahead 2-1.

Florida found a tying goal at the start of the second period, as defenseman Uvis Balinskis scored on a power play.

Matthew Tkachuk put Florida in the lead with a power-play goal from the side of the goal that deflected off Korpsalo and into the net. Anton Lundell, back from an upper-body injury, netted Florida’s fourth goal and put the Panthers ahead 4-2 late in the second period.

The Bruins cut their deficit to one as Boston forward Mark Kastelic deflected a shot from star defenseman Charlie McAvoy past Sergei Bobrovsky — who notched his 450th NHL win — 7:51 into the third period.

The Panthers survived five Bruins power-play opportunities, killing off each one and getting a short-handed goal from Lundell. But the sixth Boston power play was the charm for the Bruins, as Casey Mittelstadt scored to the the game with just under 10 minutes left in the third period.

But the Panthers could not completely escape the injury bug. Fourth-line winger Sandis Vilamanis left the game in the first period with an upper-body injury and did not return.