Islanders center Bo Horvat, left, celebrates his overtime game-winning goal...

Islanders center Bo Horvat, left, celebrates his overtime game-winning goal with defenseman Noah Dobson against the Maple Leafs at UBS Arena on Monday. Credit: Ed Murray

Not only did the Maple Leafs tie the score with 6.4 seconds left in regulation, but former Islanders captain John Tavares notched his 1,000th career point with an assist on the equalizer. He and his teammates celebrated the milestone on the ice while boos from the jilted home fans at UBS Arena serenaded him.

Through it all, Bo Horvat had one thought as overtime approached.

“Barzy and I looked at each other and just said, ‘Chance to be the heroes tonight,’ ” Horvat said of linemate Mathew Barzal.

Said and done. Barzal set up Horvat’s winner 46 seconds into overtime as the Islanders beat the Maple Leafs, 4-3, on Monday night to improve to 3-0-1 on their six-game homestand and jump into second place in the Metropolitan Division, six points behind the Rangers.

This after the Islanders (13-7-7) rallied for a 3-2 overtime win on Saturday night over the Kings, who had started the season with an NHL-record 11 straight road wins.

The Islanders are 8-1-2 since Nov. 18 and have earned at least a point in 12 of their last 13 games.

“We believe in the group here,” said Brock Nelson, who had a goal and assist and won 10 of 12 faceoffs. “We have the ability to beat anyone and get the job done. It’s a long year, it’s never going to be easy and, sometimes, it’s not always going to be pretty.”

Ilya Sorokin stopped 37 shots, including nine with the Maple Leafs skating six-on-five in the final two minutes before Morgan Rielly tied it at 3-3 in the waning seconds.

“They’re going to get their chances six-on-five,” Horvat said. “For the majority of that game, I thought we took it to them and played a really good hockey game. Ilya made some unbelievable saves tonight again. Thankfully, we got it done in overtime.”

“You don’t really have much of a choice,” Kyle Palmieri said of the Islanders having to mentally reset heading into overtime. “It’s three-on-three, so you drop the puck and you just go after it. It doesn’t really matter how you got there. The fact is you’re there and you’re trying to get that extra point.”

“We did face some adversity,” coach Lane Lambert said. “We found a way and that’s what good teams do.”

Ilya Samsonov, shaky with his puck control in the first period, made 25 saves for the Maple Leafs (14-6-5).

The Maple Leafs opened a 1-0 lead on Auston Matthews’ power-play goal at 5:50 of the first period. Matthews also hit the post at 19:29 of the first and the crossbar at 4:28 of the second period.

But the Islanders were rewarded for their steady pressure and hard work near the Maple Leafs’ crease. Nelson connected with a one-timer from the left circle off Palmieri’s backhanded feed to tie it at 1-1 at 9:20 of the first period.

Casey Cizikas put the Islanders ahead 2-1 at 18:33 of the first, getting to the crease for a feed from Cal Clutterbuck to cap a strong forechecking effort by linemate Hudson Fasching.

Nelson then found Palmieri in the slot after Palmieri raced down ice to negate a potential icing to make it 3-1 at 1:10 of the second period.

“When Palms and [Pierre] Engvall are wheeling, it helps us drive the offense a little more,” Nelson said. “As a line, it’s something you’re always trying to do, so good by Palms there.”

But the Maple Leafs closed to 3-2 at 7:42 of the second period as Tavares established position at the crease and redirected defenseman Conor Timmins’ feed from the right point.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME