Just when it looked as if the Golden Knights would open a regular season 0-2 for the first time in franchise history, their notorious history with the San Jose Sharks added another quirky storyline to their series.

Reilly Smith pushed the puck into an open net in overtime, not too long after a late-game blunder by San Jose goaltender Alex Nedeljkovic allowed the Knights to tie the game, as Vegas rallied for a 4-3 victory over the Sharks on Thursday.

“We certainly were fortunate,” coach Bruce Cassidy said. “The ironic thing is, we played that goaltender twice in preseason. He’s played great against us, handled the puck well against us.

“I guess the hockey gods went our way tonight.”

The Knights were on their way to back-to-back losses one night after losing a shootout at home to the Los Angeles Kings, and San Jose would earn its first season-opening win in five seasons. But Jack Eichel flip of the puck toward the goal got past Nedeljkovic to tie the game at 3-all with 1:34 to play and force the Knights into overtime for the second time in as many nights.

That goal wouldn’t have been possible if not for a staunch defensive effort just before, when San Jose’s William Eklund nearly scored an empty-netter to ice the game, but his first attempt sailed wide. Then, his wraparound attempt was stopped by defenseman Shea Theodore.

“That’s probably the thing that should be talked about,” Cassidy added. “That’s something, that domino effect. If he doesn’t give that second effort on that play, then we’re not talking about any lucky goals. In that regard, it’s sort of karma that Jack ends up with the goal because he’s the one who worked his (butt) off to get back and prevent the insurance goal.”

Eichel’s goal followed immediately after, giving Vegas the momentum it would need. Smith’s 23rd game-winning goal with the franchise is tied for third all-time, with captain Mark Stone, one behind William Karlsson. Jonathan Marchessault holds the all-time franchise mark with 32 game-winning goals.

Pavel Dorofeyev scored his fourth goal of the season, after he opened the campaign with a hat trick against Los Angeles. Brett Howden also scored for the Golden Knights.

Akira Schmid made 20 saves for Vegas.