CALGARY, Alberta (AP) Joonas Donskoi made an immediate impact in his return to the San Jose lineup.

Donskoi scored the game-winner with 2:48 left in the third period and also had an assist to lead the Sharks to a 3-2 victory over the Calgary Flames on Thursday night.

''He was awesome,'' exclaimed Sharks coach Peter DeBoer. ''He was on the puck all night, hounding it, carrying it, making plays. I thought he was one of our better players.''

On the deciding goal, Joe Thornton's shot was stopped, but with the puck lying loose between Mike Smith's pads, Donskoi was able to poke it over the line for his eighth goal.

''It's never easy to come back,'' said the Finn, who missed six games with a lower-body injury. ''No matter how hard you practice, it's different to play a game. I'm super excited to be back.''

Justin Braun began the sequence by knocking Johnny Gaudreau off the puck in the Sharks end after he tried to turn back up ice in an attempt to make a play. It resulted in a 3-on-2 for the Sharks.

''You can't turn back with 3 minutes left, you can't turn back, you have to play forward,'' Flames coach Glen Gulutzan said. ''You can't turn back. We needed to get points. We needed to take that into overtime and get the points. We're good at 3-on-3.''

Given how it turned out, Gaudreau was asked if he would make that same play if he had a chance to do it over again.

''It's a tough play, I probably have to get it in deep, but that's the way it goes sometimes,'' said Gaudreau, who moved into a tie for third in league scoring with a goal.

Smith wasn't happy either.

''The last goal, it's got to be stopped. It's a stoppable puck, a controllable puck, so it's on me,'' he said.

Donskoi's linemates, Chris Tierney and Timo Meier, also had a goal and an assist each to round out the scoring for San Jose (17-10-3).

Michael Frolik and Gaudreau scored for Calgary (16-13-3). The Flames fell to 8-9-0 at home.

Trailing 2-1, the Flames tied it at 7:39 of the third period when Garnet Hathaway neatly set up Gaudreau on a 2-on-1.

It came after Gulutzan had shaken up Calgary's lines late in the second in an attempt to spark the offense, moving Gaudreau off the top unit and onto a line with Hathaway and rookie Mark Jankowski.

The Sharks had taken their first lead halfway through the second period on Tierney's eighth goal of the season on a power play.

In his fourth NHL season, the 23-year-old is closing in on his career high of 11 set last year.

Power plays were a key story line in the game with the Sharks going 1 for 3 while Calgary could not generate anything in going 0 for 3. That included squandering a 37-second two-man advantage early in the second period.

''It took a lot of zip out of us and I thought they got some juice out of those kills,'' Gulutzan said.

Aaron Dell made 32 stops to improve to 6-3-1.

Smith had 26 saves in defeat, falling to 13-10-3.

Notes: It was the first of four meetings between the teams this season. ... Kris Versteeg (hip) missed his 10th game. ... Jaromir Jagr (lower body) is back skating but is still day-to-day. He's missed the last five games. ... Donskoi (lower body) returned after missing six games. ... The Flames have led after one period only four times, the fewest in the league.

UP NEXT:

Sharks: Are at Vancouver on Friday.

Flames: Host Nashville on Saturday.

Copyright 2017 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.