SAN JOSE -- The San Jose Sharks avoided elimination with a 5-2 win against the Vegas Golden Knights in Game 5 of the Western Conference First Round at SAP Center on Thursday.
The Sharks trail the best-of-7 series 3-2. Game 6 is at Vegas on Sunday.
Tomas Hertl scored two goals, Joe Pavelski had a goal and an assist, and Erik Karlsson had two assists for San Jose.
[WATCH: Golden Knights vs. Sharks Game 5 highlights | Complete series coverage]
Martin Jones made 30 saves to rebound after he was pulled for the second time in three games when he allowed two goals on seven shots in the first period of a 5-0 loss in Game 4.
"We played well," Jones said. "I'm not doing anything drastically different. Again, I was just trying to play loose out there and just try and take what was coming to me."
Video: VGK@SJS, Gm5: Jones' tremendous save preserves lead
Reilly Smith and Jonathan Marchessault scored, and Marc-Andre Fleury made 24 saves for the Golden Knights, who lost for the first time with a chance to win a Stanley Cup Playoff series; they were 3-0 in their inaugural season in 2017-18.
"It was a game that could have gone either way, and they made just a couple more plays on their goals," Vegas forward Max Pacioretty said. "They played a strong game, we knew that they would play their best. We have a little bit better we feel to give in this next game and hopefully win a hockey game. So we forget about it and move on to the next one."
Hertl gave the Sharks a 1-0 lead 1:16 into the first period on their first shot of the game, a wrist shot from the left face-off circle.
"We talk about start, and we started great today," Hertl said. "We get the lead, first goal, and right away, second goal. It's better play if you don't have to chase the game from the first minute."
Logan Couture made it 2-0 at 11:00, scoring on the rebound of a shot by Timo Meier.
Video: VGK@SJS, Gm5: Couture cleans up Meier's rebound
"I like the fact we got the lead," San Jose coach Peter DeBoer said. "That's the first time since Game 1 we've come out and started ahead, and I think that's affected our game in Game 2, 3 and 4. So it was nice to get the first goal. It just takes a little a pressure off."
Smith scored a power-play goal with a shot off Karlsson's stick from below the goal line to get the Golden Knights within 2-1 with 30 seconds remaining in the first.
Video: VGK@SJS, Gm5: Smith nets PPG on deflection
Barclay Goodrow made it 3-1 at 12:22 of the second when he tipped in a shot from Justin Braun. It was his first goal in seven NHL playoff games.
Marchessault scored a power-play goal at 11:36 of the third to make it 3-2, but Hertl scored his second of the game at 14:45 on the power play to give San Jose a 4-2 lead.
"We're definitely going to try and close it out at home," Vegas coach Gerard Gallant said. "We tried to close it out tonight, but like I said, we had a team that's playing pretty good against us. We'll go back home, get set. We have a couple of days now, which is good for our team to rest up, and we'll get ready for a big game Sunday."
Video: VGK@SJS, Gm5: Hertl nets second goal on power play
The line of Pacioretty, Paul Stastny and Mark Stone had no points for the Golden Knights after combining for 28 (12 goals, 16 assists) in the first four games of the series.
"It's already wiped out of our memory," Pacioretty said. "We look at it and try to figure out why it happened, but at the same time, forget about it and just worry about the next one."
Pavelski scored an empty-net goal with 1:46 remaining for the 5-2 final.
"It's a start," he said. "We've got to do a job resting now and get ready for an even better push from them in Game 6."
They said it
"They came out hard as expected. They are a good team. ... We have such great fan support. We've had some success at home. It would have been nice to do it tonight, but we got to finish it out next game." -- Golden Knights goalie Marc-Andre Fleury
"He's a heck of a goalie. I know everybody wants to write their things, but we've got a lot of belief in this guy. ... Made some great saves, especially that 2-on-1 (on Reilly Smith at 12:19 of the third) after they scored (to make it 3-2). Game-saving save there. That's what he's always done for us. He's made those key saves." -- Sharks captain Joe Pavelski on Martin Jones
Need to know
Sharks defenseman Marc-Edouard Vlasic returned after missing the past two games with an undisclosed injury. He was plus-1 in 23:43. ... The Golden Knights have scored at least one power-play goal in each game in the series. They are 8-for-24 (33.3 percent). ... San Jose center Joe Thornton had an assist on Hertl's second goal in his return to the lineup after he was suspended for Game 4 for an illegal check to the head of Vegas forward Tomas Nosek in Game 3. Thornton is one assist from 100 in the NHL playoffs (164 games). ... The Sharks had lost their past two playoff games when facing elimination (2018, Game 6 against Golden Knights in second round; 2017, Game 6 against Edmonton Oilers in first round).
Game 6 of Western Conference First Round at T-Mobile Arena on Sunday (7 p.m. ET; NBCSN, SN, SN360, TVAS, ATTSN-RM, NBCSCA.
Video: Sharks stave off elimination with Game 5 win