SAN JOSE -- Jaromir Jagr got his 1,900th NHL point, and Jonathan Huberdeau scored at 1:38 of overtime to give the Florida Panthers a 6-5 win against the San Jose Sharks at SAP Center on Wednesday.
Nick Bjugstad and Aleksander Barkov each scored two goals for the Panthers (25-20-10, 60 points), who are 5-1-1 in their past seven games and three points behind the Toronto Maple Leafs for the second wild card into the Stanley Cup Playoffs from the Eastern Conference.
Huberdeau won it when he beat goalie Martin Jones for his third goal in four games since returning from an Achilles tendon injury.
"We had a good forecheck out there," Huberdeau said. "It's 3-on-3, so we got a lot of opportunities, a lot of things open. I think we took advantage. Maybe they were tired or something."
WATCH: All Panthers vs. Sharks highlights
The Sharks (34-18-6) trailed 5-3 with less than four minutes remaining, but got two goals from Joe Pavelski to tie it.
Bjugstad took a pass from defenseman Alex Petrovic and beat Jones with a wrist shot from the slot at 2:15 of the third period to put Florida ahead 4-3.
Video: FLA@SJS: Jagr gets 1,900th NHL point on 45th birthday
Jagr, who turned 45 Wednesday, became the second player in NHL history with 1,900 points (Wayne Gretzky, 2,857) when he sent a pass from the slot to Barkov, who scored from close range at 12:41 to make it 5-3.
"We got to finish it when we have a 5-3 lead with four minutes to go," Jagr said. "We got to learn how to shut it down. We're probably too young and too excited. We just have to be ... more responsible. It was a good win for us, but we have to learn from that."
Pavelski cut Florida's lead to 5-4 with 3:21 remaining, and then tied it 5-5 with 37.4 seconds left when he scored his 20th goal on the rebound of a Tomas Hertl shot.
Video: FLA@SJS: Pavelski ties the game late with second goal
Panthers goalie Roberto Luongo left the game after Pavelski's second goal and was replaced by James Reimer, who played for the Sharks last season.
"He's fine," Florida coach Tom Rowe said of Luongo. "He just cramped up a little bit."
The teams combined for five goals in the first period, including four in 2:52.
Jussi Jokinen put Florida ahead 1-0 at 4:20 of the first period. After Brent Burns tied it with his 25th goal at 4:51, Bjugstad (5:35) and Barkov (7:12) scored to give the Panthers a 3-1 lead. Joel Ward got the Sharks within 3-2 when he scored at 15:25.
Video: FLA@SJS: Barkov blasts one-timer past Jones
Marc-Edouard Vlasic tied it 3-3 at 6:27 of the second period.
The Sharks (74 points), who are 1-1-4 in their past six games, lead the Anaheim Ducks by four points for first place in the Pacific Division.
Video: FLA@SJS: Vlasic banks slapper off defenseman and in
Goal of the game
Panthers defenseman Aaron Ekblad sent a long stretch pass between Sharks defensemen Brenden Dillon and David Schlemko to Bjugstad, who beat Jones with a wrist shot on a breakaway for his first goal.
Video: FLA@SJS: Bjugstad snaps puck in while falling to ice
Save of the game
Burns nearly scored his second goal of the game at 1:05 of the second period, but Luongo made a glove save on his wrist shot from the slot.
Video: FLA@SJS: Luongo extends a pad to deny Burns' wrister
Unsung performance of the game
Burns' game was overshadowed by the overtime loss, but he had a goal and an assist. His 61 points (25 goals, 36 assists) are tied for second in the League with Pittsburgh Penguins center Sidney Crosby, two points behind Edmonton Oilers center Connor McDavid.
Video: FLA@SJS: Burns scorches a wrister past Luongo
Highlight of the game
Huberdeau took a backhand pass from Barkov from below the goal line and scored the game-winner on a wrist shot from close range.
Video: FLA@SJS: Huberdeau buries Barkov's feed for OT win
They said it
"I don't know if we think we're going to be scoring six or seven goals every night. I kind of doubt that. I'm sure [Martin] Jones would take a couple of those goals back. He's a great goaltender. We caught him on a couple of those lucky ones for us. We got a good offensive team. The thing we're more concerned about is shutting teams down now." -- Panthers coach Tom Rowe
"They made some good plays. Obviously we want to be tighter, but sometimes you need a big save from your goalie. I just couldn't make the big one tonight." -- Sharks goalie Martin Jones on the Panthers forwards
"We don't want to sacrifice defense for scoring. We have enough guys in here who can score when they get the chances. We can win games 3-2, 2-1. And that's what gets it done at the end of the season. We're coming up to that point, and it's going to be a big commitment to do it the right way and limit their chances." -- Sharks captain Joe Pavelski
Need to know
Sharks forward Patrick Marleau, who scored his 500th NHL goal on Feb. 2 against the Vancouver Canucks, was honored before playing his 600th consecutive game. ... Pavelski reached 20 goals for the fouth consecutive season, eighth in his NHL career. ... Burns is the first NHL defenseman with consecutive 25-goal seasons since Al MacInnis for the Calgary Flames in 1989-90 and 1990-91.
Panthers: At the Anaheim Ducks on Friday (10 p.m. ET; SN1, FS-F, PRIME, NHL.TV)
Sharks: At the Arizona Coyotes on Saturday (8 p.m. ET; FS-A, CSN-CA, NHL.TV)
Video: Jagr tallies 1,900th point in electrifying 6-5 OT win