NEW YORK — Mika Zibanejad scored three times for his third hat trick in 22 games and seventh of his career to help lift the New York Rangers past the Buffalo Sabres 6-3 on Sunday night.

Kaapo Kakko added two goals and Kevin Rooney had an empty-netter for the Rangers, who pulled within four points of Boston for the final playoff spot in the East Division after the Bruins lost 1-0 to Pittsburgh earlier Sunday.

Adam Fox had three assists and Igor Shesterkin made 31 saves to improve to 4-0-1 in his career against Buffalo.

The Rangers won for the seventh time in their last 10 games and improved to 5-1-1 against the Sabres this season, including 3-0-0 at home. The teams meet again Tuesday night at Madison Square Garden.

“We can’t control what’s going on around the league,” coach David Quinn said regarding the playoff race. “We've just got to keep taking each game as it is and keep playing meaningful hockey until someone tells us these games aren’t meaningful.”

Jeff Skinner, Victor Olofsson and Sam Reinhart scored for the Sabres. Dustin Tokarski made 23 saves.

Zibanejad opened the scoring 4:49 into the first period with a hard wrist shot from the right wing.

Skinner tied it less than two minutes later, stopping teammate Colin Miller’s shot from the point with his stick before backhanding the puck past Shesterkin. Skinner has three goals in his last 11 games after scoring just three in his first 35 games of the season.

Kakko gave the Rangers a 2-1 lead midway through the first with a one-timer off an impressive pass from Fox.

“That’s his vision,” Kakko said of Fox. “He’s a great player and when he's got the puck at the blue line, just be ready, he can do something like that.”

Fox has 11 points — one goal, 10 assists — in seven games against the Sabres this season.

Filip Chytil had a great chance to add to the Rangers’ lead later in the first but missed an open net, shooting just wide.

Zibanejad scored his second of the night shortly after, making the score 3-1.

With Rasmus Dahlin in the penalty box for interference, Zibanejad redirected a pass from Artemi Panarin to beat Tokarski from the slot.

Zibanejad completed his hat trick 2:05 into the second period when he gave New York a 4-1 lead. Controlling a pass from Pavel Buchnevich between his legs as he crossed the blue line, Zibanejad carried the puck deep before scoring from a tight angle.

“I’ve probably had better games than tonight where I didn’t have three goals,” Zibanejad said. “The puck just seemed to go in today. When you have that feeling, you just keep shooting.”

Buffalo had an opportunity to cut into the Rangers’ lead midway through the second period when Ryan Strome and Buchnevich committed back-to-back penalties. With just six seconds remaining in the second power play, Olofsson found the back of the net to make the score 4-2.

Following a shot by Buchnevich, Kakko jammed home the rebound to score on the power play 7:06 into the third period, giving New York a 5-2 lead. With an assist on the goal, Zac Jones earned his first career point in his third NHL game.

“It was a pretty easy one, if I say so myself,” Jones said. “Just give the puck to Buchnevich, let him do what he does.”

Reinhart cut the Rangers’ lead to 5-3 midway through the third period. Tokarski recorded the secondary assist on the goal, earning his first point since Jan. 17, 2015.

“They play a wide-open game,” coach Don Granato said of the Rangers. “They sling pucks, east-west, spread the ice out very well. We dug ourselves too big of a hole.”

Zibanejad had a chance for a fourth goal with a short-handed breakaway with less than four minutes remaining, but couldn’t score.

RANGERS DUO HURTING SABRES

With their assists, Fox and Panarin became the first Rangers to record at least one point in five straight games against the Sabres in a single season since Pete Stemkowski in 1973-74.

RANGERS SPECIAL TEAMS KEY

The Rangers outscored the Sabres 2-1 on the power play and added a short-handed goal, making them 16-3-2 this season when outscoring their opponent on special teams.

DefenceMEN MOVES

Miller returned to Buffalo’s lineup in place of William Borgen, who was rested after returning from a two-month injury layoff to play Thursday and Friday. ... Jacob Trouba missed his third straight game for the Rangers due to an upper-body injury.

More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP_Sports