​A late goal by Dougie Hamilton and a pair of clutch saves by goalie Chad Johnson led the Calgary Flames to a 3-2 win over the San Jose Sharks on Wednesday.

Hamilton scored at 17:41 of the third period, while Johnson turned aside a short-handed breakaway by Mikkel Boedker with just eight seconds left in the game.

"I think everybody was pretty shocked," Johnson said of Boedker's late scoring chance. "We've got a power play and all of a sudden, eight seconds left a guy's on a breakaway from the blue line. You've kind of just try to stay focused and stay with him and thankfully nothing came of it."

Johnson also stuck out his left pad to stop Boedker from scoring on a penalty shot at 14:33 of the third.

"On the penalty shot, I just tried to stay with him," said Johnson, who made 25 saves to pick up his 15th win of the season. "I played with him in Phoenix, so I tried to go back in the memory log there and just try to remember what he did. He had two good looks there, but I got lucky and made the saves."

Hamilton and rookie forward Matthew Tkachuk both finished with a goal and an assist for the Flames (23-19-2), while Michael Frolik also scored. Mikael Backlund picked up a pair of assists.

"It's big," Hamilton said of beating the Pacific Division-leading Sharks. "I think for us, we've just go to try to win every game. Obviously right now it's tough to move up the standings, so we've got to do it now instead of trying to do it later in the season."

Brent Burns had a goal and an assist for the Sharks (25-15-2), while Logan Couture also scored.

"Just losing makes it tough," said Burns, who scored once and set up two others in Edmonton on Tuesday to lead the Sharks to a 5-3 win over the Oilers. "You don't like to give away points. That's all that matters."

Making just his sixth start of the season, San Jose goalie Aaron Dell made 25 saves in a losing cause.

"It was pretty cool," said Dell, 27, who's from nearby Airdrie, Alta., and played two seasons for the Calgary Canucks of the Alberta Junior Hockey League from 2007-09. "I dreamed of playing here growing up. It was a dream come true. It could've been a little better."