NEW YORK - Chris Kreider and Mika Zibanejad scored in a 6-second span late in the first period and the New York Rangers earned a 5-3 win over the Toronto Maple Leafs on Wednesday night.

Kreider and Zibanejad each had a goal and an assist, Pavel Buchnevich had a goal and two assists and Filip Chytil and Greg McKegg also scored for the Rangers. Rookie goalie Igor Shesterkin made 27 saves to win for the fourth time in five 7starts this season.

Auston Matthews had two goals and John Tavares also scored and added an assist for the Maple Leafs, who are in a tight race for a playoff spot in the Eastern Conference.

Backup goalie Michael Hutchinson, who had won his previous four starts, had 30 saves for Toronto. Starter Frederik Andersen left Monday's loss to Florida with a neck injury. The Maple Leafs blew a 3-1 third-period lead and lost 5-3 to the Panthers.

Kreider returned to the lineup after missing Monday's loss to Dallas. Kreider was accidentally hit in the head by Zibanejad's knee in Saturday's win at Detroit.

Kreider, who will become an unrestricted free agent at the end of the season, is a candidate to be traded at the league's deadline in a few weeks.

Tied 1-1 late in the first period, the Rangers scored two quick goals to stun the Leafs.

First, Kreider won a draw in the Toronto zone and Zibanejad ripped a wrist shot past Hutchinson for his 21st of the season at 17:18.

Then on the subsequent faceoff, Zibanejad won the draw and Kreider took off with the puck and fended off defenceman Justin Holl and skated toward the net and beat Hutchinson with a backhand for his 19th at 17:24.

The franchise record for the fastest two goals is 4 seconds, set by Martin St. Louis and Rick Nash on Oct. 19, 2014.

Matthews scored his second goal of the game and his 39th of the season on the power play at 16:32 of the third to cut it to 4-3. But McKegg scored an empty-netter to hand the Leafs their second consecutive loss.

Trailing 3-1 after the first, the Maple Leafs scored late in the second period. After sustained pressure in the Rangers' zone, Matthews sent a backhand to the net that beat Shesterkin at 16:56.

The Rangers regained their two-goal lead just 34 seconds later. Hutchinson briefly lost his stick and while scrambling to get reset, Buchnevich scored his 11th of the season at 17:30 to make it 4-2.

Coming off the blown lead against the Panthers, the Maple Leafs opened the scoring against the Rangers.

Holl sent a pass to William Nylander, who wristed a shot on the net. Tavares connected on the rebound into an open net and scored his 20th of the season at 7:36. Tavares has scored at least 20 goals in each of his 11 seasons.

The Rangers answered a short time later.

Tony DeAngelo sent a pass from the right faceoff circle that Chytil slid into the net for his 12th at 8:50 to tie it at 1-1.

NOTES: 2002 Olympic gold medal-winning figure skater Sarah Hughes was in attendance. ... Frederik Gauthier, Martin Marincin were scratched by the Leafs. ... Alexandar Georgiev, Brendan Smith were scratched for the Rangers.

UP NEXT

Maple Leafs: Host Anaheim on Friday night.

Rangers: Host Buffalo on Friday night in third game of a four-game homestand.