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 snuck by the Blue Jackets, 4-3, at the Barclays Center 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 looked to impact his right knee and is officially listed with a lower-body injury. Coach Jack Capuano said after the game that he hoped for an update on Hamonic on Friday, but “obviously, if he didn’t return — he’s a tough kid — obviously there’s something there.”

The injury has 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 unawares on the 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. With help from the Detroit Red Wings, the Islanders could clinch a playoff berth as early as tomorrow. The Isles pulled within two points of the third place Rangers.

After going down by a goal four minutes into the first, the Islanders scored three straight, two by Tavares, before allowing the Blue Jackets to tie it on Boone Jenner’s goal in the opening seconds of the third.

“It was a pretty lucky bounce but we’ll take it and move on,” Lee 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 that saw Frans Nielsen blocking shots without his stick — but he made a pivotal miscue in the second that helped the Jackets’ draw within one.

Columbus, which managed only two shots in the first, dominated on puck possession and lived in the offensive zone 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 on a top-shelf wrister 37 seconds into the third period in what turned out to be another relatively rough night for Greiss.

“It was a gutcheck 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.