Open this photo in gallery:

Calgary Flames left wing Joel Farabee controls the puck against the San Jose Sharks during the second period at Scotiabank Saddledome in Calgary on Saturday.Sergei Belski/Reuters

Joel Farabee’s short-handed goal at 6:53 of the third period snapped a 2-2 deadlock and lifted the Calgary Flames to a 3-2 victory over the San Jose Sharks on Saturday.

Morgan Frost and Matvei Gridin, both with their 12 goals of the season, also scored for the Flames (22-26-6), who snapped a five-game losing streak. Calgary trailed 1-0 and 2-1 during the game.

Will Smith and Adam Gaudette scored for the Sharks (27-22-4), who have lost two in a row and four of their last seven.

Alex Nedeljkovic stopped 39 of 42 shots in the Sharks’ net, while Dustin Wolf stopped 23 shots for the Flames.