TORONTO (AP) Frederik Andersen stole another two points in the standings for the Toronto Maple Leafs.

Anderson made 47 saves in regulation and overtime and stopped three more shots in a shootout in the Maple Leafs' 2-1 victory over the Calgary Flames on Wednesday night.

"I just want to take it one game at a time, real important to be able to flip the page," Andersen said.

William Nylander scored the winner in the fourth round of the shootout, deking to the backhand to beat Mike Smith. Morgan Rielly scored in regulation for the Maple Leafs. Toronto improved to 18-10-1 and moved into second place in the Eastern Conference, three points behind Tampa Bay.

"I didn't think we had very good legs. We looked like a team that came back from a road trip even though we had days to recover," Toronto coach Mike Babcock said "I thought we'd get traction and take over but that didn't happen. ... In the end our goalie was better."

Mark Giordano scored for Calgary, and Smith stopped 28 shots. The Flames have dropped three in a row.

"We did exactly what we wanted to do, played with energy, put pucks on the net," Giordano said. "If we play like that we'll get two points more often than not."

Calgary had control early when Toronto's Matt Martin went to the box midway through the first period. Giordano made Martin pay for his hooking penalty when his wrist shot from the point went through traffic and beat Andersen midway through the first.

Later in the period, Martin checked Troy Brouwer into the boards between the benches, leading to a brief scrum. Flames forward Matthew Tkachuk appeared to spear Martin from the bench while the altercation ensued, but it went undetected by officials.

Sean Monahan almost doubled Calgary's lead seven minutes into the second only for Andersen to turn him away from between the hash marks. Andersen was there again to bail out his teammates late in the period on a Toronto power play when Calgary had a 2-on-1 short-handed break after a turnover at the Flames' blue line.

Rielly tied it with 1:13 to play in the second, with his shot from the sideboards beating a screened Smith blocker side.

"I thought it was a good hockey game. I look at how our team played start to finish I like our game," Flames coach Glen Gulutzan said. "From our defense, all six, to all four lines, I thought contributed. It was a good road game for us. We'd like the two points, but it didn't happen."

NOTES: Flames winger Jaromir Jagr missed the game because of a lower-body injury. ... Toronto center Tyler Bozak was back in the lineup after missing two games and was placed on a line between James van Riemsdyk and Mitch Marner to start the game. .... Toronto beat Calgary 4-1 on Nov. 28. ... Members of the Grey Cup champion Toronto Argonauts took part in the ceremonial puck drop.