The Islanders’ magic number is down to five, but they paid a mighty price in the process.

Anders Lee scored a power-play goal 5:23 into the third period as the Islanders sneaked by the Blue Jackets, 4-3, at Barclays Center on Thursday night. But even a win in the first game of a pivotal stretch did little to assuage the sting of Travis Hamonic’s injury, which occurred in the first period and cost him an early exit and an uncertain near future.

The defenseman, who missed the playoffs last year with a torn left knee ligament, appeared to go knee-to-knee with Scott Hartnell before dropping to the ice. He appeared to impact his right knee and is officially listed with a lower-body injury. Coach Jack Capuano said after the game that he hopes for an update on Hamonic today, but “obviously, if he didn’t return — he’s a tough kid — obviously, there’s something there.”

The injury triggered immediate flashbacks and probably contributed to a somewhat muted locker room after the game. “It’s tough,” John Tavares said. “We know what happened last year. It was a little bit of a questionable play from what we saw . . . We hope he’s OK.”

It could have been even worse for the Islanders if not for a fortuitous bounce in the third period. Lee caught Sergei Bobrovsky unaware on a power play when his skate deflected in a carom off the boards for the 4-3 lead. The Blue Jackets challenged the call for goalie interference, but Lee, who was just outside the crease at time of contact, tipped it in cleanly.

$relatedItem.embed_code.value

With help from the Detroit Red Wings on Friday night, the Islanders could clinch a playoff berth as early as Saturday. The Isles pulled to within two points of the third-place Rangers and have a game in hand.

advertisement | advertise on newsday

After falling behind by a goal four minutes into the first period, the Islanders scored three straight, two by Tavares, before allowing the Blue Jackets to tie it on Boone Jenner’s top-shelf wrister 37 seconds into the third. Then Lee put them ahead again.

“It was a pretty lucky bounce, but we’ll take it and move on,” he said. “It’s a playoff push, an important two points for us . . . and good teams know how to hold on to leads.”

Goalie Thomas Greiss locked it down in the third period — including a Columbus power play in the final three minutes in which Frans Nielsen blocked shots without his stick — but he made a pivotal miscue in the second period that helped the Jackets draw to within one.

Columbus dominated on puck possession in the second, finally breaking through at 15:48 when Brandon Saad fluttered in a man-up goal past Greiss, who flat-out missed the stop, to make it 3-2.

Jenner tied it in what turned out to be another relatively rough night for Greiss.

“It was a gut-check win for us against a good team,” Capuano said. “I give our guys a lot of credit.”

With Hamonic possibly joining the injured list, it’ll only get harder from here.