New York Islanders' John Tavares, left, celebrates with teammates Josh...

New York Islanders' John Tavares, left, celebrates with teammates Josh Bailey, center, and Travis Hamonic after defeating the Calgary Flames in overtime NHL hockey action in Calgary, Alberta, Thursday, Feb. 25, 2016. Credit: AP / Jeff McIntosh

CALGARY — The Islanders were far from good for most of Thursday night, but they are a good team. That means you have to win a few when you’re playing below your level.

Anchored by another strong night from Jaroslav Halak in net, the Isles rallied to tie the score in the third and won, 2-1, on Josh Bailey’s goal with 17.8 seconds left in overtime.

“We don’t have a chance to win that without Jaro’s performance,” Matt Martin said. “You have games like this and it felt like at times they were skating circles around us. But we got the two points.”

Calgary’s top line of Johnny Gaudreau, Sean Monahan and Jiri Hudler produced the lone goal of the first 50 minutes, from Hudler, and they were dangerous all night. But Halak denied Hudler alone from in front early in the third to keep it a one-goal game and that save, one of Halak’s 31 on the night, allowed the Isles to produce the tying score.

It came from Calgary native Thomas Hickey, who skated down the slot, received Martin’s pass and muscled a backhand under Joni Ortio’s arm to make it 1-1 at 9:49.

Halak made three good stops on a Flames power play soon after to help get the game to OT and earn the Islanders two points.

They got the winning goal off a slightly broken play. John Tavares fanned on a back pass to Travis Hamonic during the final half-minute of three-on-three, but that whiff allowed Tavares to turn back and get a step on Gaudreau. He sent a pass across the slot, where Bailey roofed it for the winner.

It was the first OT goal for the Isles since Dec. 12, giving them a 3-4 record in the extra session. Jack Capuano made a change, going with two forwards and one defenseman.

“It obviously wasn’t working with one forward and two D,” Capuano said. “We made the decision not long ago to go with this the next time we got to OT.”

There was no explaining the way the Islanders played the opening 40 minutes. “Terrible,” Capuano said. The Isles had eight shots on Ortio in the opening six minutes of the game, then just 14 the next 34 minutes. Capuano sat Brock Nelson and Anders Lee for long stretches of the third, unhappy with the turnovers from that line.

Though it wasn’t just those two. Capuano tried to spark some offense in the final minute of the second, putting Tavares, Frans Nielsen and Kyle Okposo together for a shift. It resulted in a two-on-one and a three-on-one for the Flames, neither of which produced a shot.

“You’re not where you want to be after 40 minutes, so we came in and just said, ‘Let’s play 20 here and see what happens,’” Hickey said. “These are the games you need to win if you’re going to be a playoff team.”

The Islanders, who are in third place in the Metropolitan Division, kept pace with the second-place Rangers, and remained three points back with two games in hand. The gap between the Isles and the ninth-place Devils in the conference standings is six points and the Isles have three games in hand.

“You’re not always going to be at your best,” Bailey said. “It’s about points and wins this time of year and we got what we needed.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME