William Nylander scored the tying goal late in regulation and Nikita Soshnikov had the only goal of the shootout to lift the Toronto Maple Leafs to a 4-3 victory over the New York Islanders on Wednesday night.

Zach Hyman and Morgan Rielly also scored in regulation and Garret Sparks stopped 24 shots in his second straight start for the Maple Leafs, who had lost six in a row (0-5-1) — including the last five by one goal. Toronto also won for just the third time in 16 games (3-11-2).

John Tavares, Nick Leddy, and Ryan Strome scored for the Islanders, and Thomas Greiss finished with 33 saves. New York snapped a four-game winning streak and fell to 11-2-2 in its last 15.

Strome gave the Islanders a 3-2 lead with 5:19 remaining in the third period, his shot trickling between Sparks' pads before crossing the goal line.

Nylander, who scored his second goal in only his sixth NHL game, knocked in a rebound past Greiss to tie it with 1:13 left in regulation.

Earlier in the day, the Islanders announced No. 1 goalie Jaroslav Halak would miss six weeks with a lower-body injury. Greiss is likely to draw the bulk of starts in his absence.

The Islanders remained three points behind the New York Rangers for second place in the Metropolitan Division with two games in hand.

Tavares opened the scoring with a breakaway goal early in the first, his 25th goal this season. The Islanders' captain picked off Nazem Kadri's pass at his own blue line, broke free of panicked defenders and then beat Sparks in alone with his second attempt on goal.

Hyman followed with his second career goal moments later. The 23-year-old, who scored his first NHL goal on Monday night, shoveled a rebound past Greiss following a point shot from Leafs defenseman Martin Marincin.

Marincin was moved to Toronto's top pair for the game after Matt Hunwick was shut down with season-ending sports hernia surgery. Hunwick's early replacement for Wednesday's game, Viktor Loov, was also forced out with injury and was replaced by 26-year-old TJ Brennan, who was playing his first NHL game this season.

Rielly gave the Leafs their first lead midway through the second, beating Greiss with a power-play goal from high in the slot. Rielly was set up on the play by Kadri, who deftly waited for the trailing Rielly to find his way into the offensive zone.

Leddy tied it with just more than 7 minutes remaining in the second, going end-to-end with the puck before beating Sparks with a wrist shot.

NOTES: Tavares scored his 199th career goal, and has 10 goals and 22 points in his last 17 games. ... Leddy has two goal and 16 assists in his last 18 games. ... Toronto has gotten six goals from the group of four rookies recalled following the NHL trade deadline last week, including two each from Hyman, Nylander and Soshnikov. ... Earlier in the day, the Leafs announced their participation in the first-ever NHL Centennial Classic. Toronto will host the Detroit Red Wings at BMO Field on Jan. 1, 2017, a celebration of both the league and Leafs' 100th season. ... The Leafs had P.A. Parenteau back in their lineup for the first time after the trade deadline. Long expected to be traded ahead of the Feb. 29 deadline, Parenteau remained with Toronto, missing the previous five games with an upper-body injury. He finished with four shots in nearly 18 minutes.