ANAHEIM, Calif. — Ryan Getzlaf and the Anaheim Ducks appear to be turning things around after a two-week slump.

The Ducks got their second victory in three games Wednesday night as they defeated the Calgary Flames 3-2. Getzlaf supplied the game-winning goal in the third period 27 seconds after the Flames tied it while they were short-handed.

"We've been working hard to close out a couple of these games," said Getzlaf, who scored his second game-winning goal of the season and 49th of his career. "It was pretty exciting. Emotions are high in this room."

The Ducks began the season 5-1-1 but managed only two points in their next seven games before a 3-2 overtime victory against Columbus on Sunday. Anaheim lost to Los Angeles 4-1 on Tuesday, but Getzlaf said it was good to get back on the ice quickly and put that defeat behind them.

It wasn't easy, though. Anaheim led 2-0 in the first but Calgary rallied to tie it six minutes into the third when Mark Jankowski stole the puck from Brandon Montour in the neutral zone and shot it just over Ryan Miller's glove while leading a 2-on-1 rush.

The Ducks, though, were quickly able to seize back momentum. Getzlaf corralled a loose puck in front and directed a backhand through Mike Smith's legs to snap the Flames' four-game winning streak.

"In the end we gutted it out in the third period and found a way," Anaheim coach Randy Carlyle said. "I thought we started the right way. We didn't want to sit back and worry about what happened last night. It was more about being in the present."

Jakob Silfverberg and Adam Henrique also scored for Anaheim. Miller made 37 saves and tied Andy Moog (372) for 17th on the career wins list.

"He's a goalie I watched growing up," Miller said. "I used to try to draw his helmet all the time on my street hockey helmet. It's pretty cool to be playing long enough to win enough games to be mentioned."

Calgary pulled Smith for an extra skater with 2:28 remaining and then was on a power play for the final 74 seconds after Rickard Rakell was called for slashing. But the Flames were never able to get a clean shot on goal despite the two-man advantage.

"We had some good looks but I thought we needed to do a little more offensively," Calgary coach Bill Peters said. "I liked our third period but we ended up chasing the game again here today."

Matthew Tkachuk also scored for Calgary, which has won only once in its last 28 trips to Anaheim. Smith stopped 21 shots.

The Ducks got on the board at 8:37 of the first when Silfverberg carried the puck into the Calgary zone and ripped a slap shot for his fifth goal of the season. Henrique gave them a two-goal lead three minutes later when he pounced on a rebound after Smith stopped Josh Manson's shot from near the blue line.

With less than three minutes left in the first, Calgary scored on the power play when Tkachuk redirected Elias Lindholm's drive past Miller.

NOTES: Anaheim D Jacob Larsson got an assist on Silfverberg's goal for his first NHL point. Larsson was the Ducks' first-round selection in the 2015 draft. ... The Ducks are 3-1 in the second game of back-to-backs ... Tkachuk has a point in four straight games, with two goals and four assists. ... Lindholm's assist extended his point streak to six games (three goals, six assists). ... C Sean Monahan had a six-game point streak snapped (four goals, six assists).

UP NEXT

Flames: Continue their California swing at Los Angeles on Saturday.

Ducks: Host Minnesota on Friday.

___

More AP NHL: https://apnews.com/NHL and https://twitter.com/AP_Sports