Islanders center Mathew Barzal reacts after he scored against the...

Islanders center Mathew Barzal reacts after he scored against the Maple Leafs in overtime of an NHL game at UBS Arena on Thursday. Credit: Kathleen Malone-Van Dyke

It wasn’t the four revamped forward lines that were the difference for the Islanders as far as coach Lane Lambert was concerned. It was his team’s resolve.

The Islanders snapped a two-game losing streak by rallying from a two-goal deficit in a wildly entertaining 4-3 overtime win over the Maple Leafs on Thursday night at UBS Arena as they reached the midpoint of their 82-game schedule.

All-Star Mathew Barzal capped a four-point night with the winner just 21 seconds into the extra period as defenseman Noah Dobson notched his career-high fourth assist.

“I don’t know if it was so much [the lines] as it was the players,” Lambert said. “They took it upon themselves. We knew we had a performance the other night that we didn’t really like. Our guys showed a lot of character.”

Ilya Sorokin made 32 saves in his ninth start in 11 games, allowing the Islanders to reach overtime despite being outshot 9-3 in the third period.

“It was so important to him to win tonight,” said defenseman Alexander Romanov, who cut the Islanders’ deficit to 3-2 at 4:18 of the second period with a rising ripper from the left circle just under the crossbar. “He wasn’t happy with his game the last two games. We supported him today and he had a great game.”

The Islanders (18-12-10), who moved back into third place in the Metropolitan Division, concluded a disappointing 1-2-1 road trip with a 5-2 loss to Vegas on Saturday night, then were lethargic in a 5-2 loss to the visiting Canucks on Tuesday night.

They went 2-for-3 on the power play against the Maple Leafs.

Martin Jones made 26 saves for the Leafs (21-10-8), who had their four-game winning streak snapped after allowing only three goals in those four matches. Formr Islanders captain John Tavares continued to be booed every time he was on the ice.

“Tonight was just all about everybody chipping in,” said Barzal, who added three assists for a season-high four-point outing. “A big collective effort. That’s why we won.”

“When you come back like that and the crowd was into it, I just felt like everybody was going tonight,” said Bo Horvat, who tipped Dobson’s blue-line shot for a power-play goal to tie it at 3-3 at 13:51 of the second period. “We didn’t have any passengers. Everybody was moving their feet first instead of making the cute play. We kept our game relatively simple. That’s our hockey. We’ve got to continue to do that.”

Casey Cizikas (lower body) being sidelined spurred the lineup changes.

Barzal moved from Horvat’s right wing back to his natural center, though he was double-shifted for much of the last two periods at Oliver Wahlstrom’s expense. Wahlstrom, a healthy scratch for 15 of the last 17 games, started in Barzal’s usual spot.

Kyle Palmieri, who opened the scoring with a power-play goal 40 seconds into the game by knocking in the rebound of Dobson’s shot to snap a 12-game goal drought, was moved to Barzal’s right wing along with Simon Holmstrom. Hudson Fasching took Palmieri’s spot on Brock Nelson’s line with Pierre Engvall and Jean-Gabriel Pageau skated in Cizikas’ spot between Matt Martin and Cal Clutterbuck.

“They definitely gave us some energy,” Barzal said of the lines. “Pager’s line came out buzzing. I thought all four lines were going.”

Still, Auston Matthews scored twice in the opening 2:40 of the second period to give the Maple Leafs a 3-1 lead.

“It was a huge win,” Dobson said. “Losing a couple in a row, we needed to respond after the last game. It wasn’t good enough. It was a good response.”

More Islanders

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME