SAN JOSE, Calif. — San Jose rookie Joonas Donskoi wasn't very happy with his overall game. He felt he had to make up for a tripping penalty that led to Calgary's second goal of the first period.
Everything turned out all right in the end.
Donskoi scored the winning goal in a shootout, and the Sharks rallied to beat the Flames 3-2 on Thursday for their third straight victory.
"You've got to put some streaks together," said Joe Pavelski, who scored his eighth goal of the season. "To win three in a row, you can't be satisfied. You've got to go for four or five. I don't know if this is the time or not, hopefully you can start creating a little separation."
The Sharks were stymied for most of the night by Flames goalie David Rittich, but they got a late goal in the third period on Timo Meier's re-directed shot.
Pavelski, who scored San Jose's first goal, got the puck past Rittich in the first round of the shootout. After Calgary missed its first two attempts, Donskoi deked Rittich and then wrapped a shot around the goalie for the game-winner.
It was a welcomed sight for Donskoi, whose tripping penalty set up a power-play goal by Mikael Backlund.
"That's a pretty big penalty to take, especially so when they score a PP goal after that," Donskoi said. "It never feels good. I didn't feel good about my game today at all. Good we got two points and that's all that matters."
Martin Jones made 32 saves for San Jose.
Both teams missed multiple scoring chances in the extra period, including a one-timer by Calgary's TJ Brodie that was stopped by Jones.
Rittich made 30 saves in his fourth career start. Garnet Hathaway also scored for the Flames, and Jaromir Jagr took another step toward breaking Gordie Howe's record for games played.
Calgary lost for the first time this season when leading after two periods.
"We just need to manufacture some extra points in the game so we can hold leads," Flames coach Glen Gulutzan said. "We had some real good looks in overtime. If we could have gotten a goal on one those other power plays we would have won this game."
Jagr entered early in the first period, tying Ron Francis for third place on the NHL's games list with 1,731. Jagr, who played 13 minutes, turns 46 in February and needs 37 games to break Gordie Howe's record of 1,767.
Hathaway took advantage when the Sharks had trouble clearing the puck from in front of the net and tapped in his second goal of the season to put Calgary up 1-0 early in the first period.
After Pavelski tied it with a power-play goal, Backlund re-directed a power-play shot by Tkachuk past Jones to make it 2-1 Flames at 15:45 of the first.
NOTES: Pavelski's goal was his 200th since 2011-12, fourth-most in the NHL during that time. ... Jagr had missed the previous two games with a lower-body injury. ... The Sharks have scored at least one power-play goal in nine consecutive games. ... Calgary's Michael Frolik left the game in the second period after taking a puck to the face off a shot by Burns. . Sharks C Logan Couture missed his fourth straight game because of a concussion, but is making progress and took part in the morning skate before the decision was made to hold him out. ... Rittich made his NHL debut in San Jose in the final regular-season game last year.
Flames: Play at Anaheim on Friday.
Sharks: Play at Dallas on Friday.