SAN JOSE -- The San Jose Sharks lost their first game under coach Bob Boughner, 6-3 to the New York Rangers at SAP Center on Thursday.
The Sharks (15-17-2) have lost six games in a row (0-5-1) and fired Peter DeBoer as coach in his fifth season Wednesday.
"I think we came out pretty good, I think pretty strong, I think our compete, there were some good things tonight," Boughner said. "Obviously, it wasn't a complete 60 (minutes). In the third period, it looked like we ran out of some gas there a little bit."
[WATCH: All Rangers vs. Sharks highlights]
Artemi Panarin had his first hat trick with the Rangers (16-12-3), who is 7-3-1 in its past 11 games. Mika Zibanejad scored two goals.
"It's kind of our responsibility," Zibanejad said. "We get that ice time. We get the opportunities to be the guys who are supposed to produce offensively."
New York scored four straight goals in the third period to rally for the win.
"They just had more jump than us in the third," San Jose goalie Martin Jones said. "We've got to find a way in a tie hockey game to come out with a little bit more energy.
"I don't know how many shots or scoring chances we had in the third, but we've got to find a way to put more pressure on in a close hockey game like that."
Video: Enterprise Hat Trick: Panarin nets three vs. Sharks
Defenseman Brenden Dillon scored his first goal in 107 regular-season games at 4:12 of the third to give the Sharks a 3-2 lead.
"You get a lead with 15 minutes left, you've got to defend a little harder and not turn the puck over like we did," San Jose captain Logan Couture said. "We wanted to defend our slot harder. I don't think we did."
Zibanejad scored at 8:49 on the power play to tie the game 3-3 and at 13:10 to give the Rangers a 4-3 lead.
"At the beginning of the year, we really didn't have answer for falling behind during the game and we couldn't find a way to get our momentum back," Zibanejad said. "But now we're finding ways to crawl back into games. We aren't playing great, trusting our system and working on the little things."
Video: NYR@SJS: Zibanejad scores PPG in 3rd period
Panarin gave New York a 5-3 lead with his second of the night at 16:49. He completed the hat trick at 17:36 to make it 6-3.
"I'll enjoy the trick tomorrow," Panarin said. "We played some of the periods well and then some not so well. A road win is especially good because it's so hard to play on the road."
The Rangers scored twice in 2:54 early in the second period to take a 2-1 lead.
Jesper Fast dropped to his knee to one-time a cross-ice pass from Filip Chytil at 5:02 to tie it 1-1.
Video: NYR@SJS: Fast buries a one-timer from the circle
Panarin scored to make it 2-1 at 7:56 when he squeezed a wrist shot from a tough angle between the near post and goalie Martin Jones.
The Sharks tied it 2-2 when Logan Couture scored his 10th goal at 11:32.
San Jose took a 1-0 lead at 9:13 of the first period when Tomas Hertl scored shorthanded.
Alexandar Georgiev made 15 saves for New York.
They said it
"When we went down 3-2, we really started to show some things we hadn't shown a lot this year. We didn't feel sorry for ourselves and we were able to climb up from the hole. Once we tied it up, we became relentless out on the ice. You could feel the momentum change on our bench when we tied it at 3." -- Rangers coach David Quinn
"We passed up too many shots, which we've done lately. You have to take more than 18 shots to win hockey games in this league." -- Sharks captain Logan Couture
Need to know
Panarin is the 17th player in NHL history to score his first three hat tricks each with a different team (Chicago Blackhawks, Columbus Blue Jackets, Rangers). ... Sharks center Joe Thornton became the 12th player in NHL history to play 1,600 games. He and Patrick Marleau (1,687) are the first teammates to play in the same game with each having played at least 1,600 NHL games. ... With a season-high four points, Panarin extended his point and goal streaks to three games (five goals, two assists). ... New York forward Chris Kreider has one goal and three assists during a three-game point streak.
Rangers: At the Anaheim Ducks on Saturday (4 p.m. ET; PRIME, MSG, NHL.TV)
Sharks: Host the Vancouver Canucks on Saturday (10 p.m. ET; CBC, SN, SN360, SN1, CITY, NBCSCA, NHL.TV)
Video: Panarin's hat trick, Zibanejad lead Rangers to win