CALGARY, Alberta — Perhaps Roman Polak’s luck is starting to turn.

The Maples Leafs defenseman scored his first goal of the season and Frederik Andersen made 19 saves as Toronto beat the Calgary Flames 4-1 on Tuesday night.

The game was scoreless until late in the first period when Polak gave the visitors a lead they would not relinquish with a fluke goal that pinballed off two Flames on the way into the net.

“Lucky shot,” the 31-year-old Czech said. “I broke my stick on the shot too and it was a rolling puck.”

Polak’s slap shot from the blue line first deflected off Mark Jankowski and then, as it was going well wide of the Calgary net, it deflected off the knee of Travis Hamonic and straight past goaltender Mike Smith.

It’s been a tough go for Polak, who suffered a major leg injury in the second game of last season’s playoffs that resulted in offseason surgery.

Not able to get a contract, he ended up signing a professional tryout contract with Toronto, only to be released from it in the preseason. But he stuck around town and eventually agreed to a one-year deal.

Tuesday was just his seventh game of the season and second game after missing 10 as a healthy scratch.

“The biggest thing is just don’t overdo it. Don’t be too excited. Just do your job and play your game and that’s what I’m trying to do,” Polak said.

Nikita Zaitsev, Nazem Kadri and Leo Komarov, with an empty-netter, also scored for Toronto. The Leafs improved to 8-2-1 in their last 11 and are 4-0-1 in their last five road games.

“We have a lot of road games coming up so we want to make sure we get some points and play well and keep this going,” Andersen said.

Michael Stone scored for Calgary, which was kicking off a four-game home stand.

“We score one goal, on most nights you’re not going to have a chance to win,” Flames captain Mark Giordano said. “They were better tonight.”

Toronto extended its lead to 2-0 at 12:36 on another deflection off a Flame. This time, it was Zaitsev’s 30-foot wrist shot that ticked off the stick of Mikael Backlund and slipped through Smith’s pads.

That would be all the offense Andersen would need. The long-time adversary of the Flames from his time in Anaheim, improved his career mark to 6-0-1 against Calgary.

“It’s a fun building to play in. A little bit more Leafs fans than Ducks fans,” Andersen said with a smile. “It’s special for us to come here. It’s always fun having both teams getting the chants going.”

Andersen’s best stop came 6 minutes into the second with Calgary looking for the tying goal. Matthew Tkachuk was set up in front on a pretty three-way passing play with Backlund and Micheal Ferland, but Andersen thrust out his right pad to get a toe on the dangerous chance.

Two minutes into the third period, the Leafs surged in front 3-0 when the puck caromed off a skate to Kadri in the slot and he ripped a shot past Smith for his 12th goal of the season.

Stone’s slap shot inside the far post at 5:29 ruined Andersen’s shutout, but that’s as close as the Flames would get.

“They got a couple bounces there but we’ve got to fight back and battle a little bit harder than we did,” Flames center Sean Monahan said.

Calgary’s power play went 0 for 3 and failed to generate a shot.

“Our power play, without (Kris Versteeg) here today, obviously you could tell we were a little out of synch,” Flames coach Glen Gulutzan said.

Toronto had a 30-20 edge in shots.

Andersen improved to 14-7-1 on the season while Smith fell to 11-8-1.

Notes: The teams meet again in Toronto on Dec. 6. … Jaromir Jagr (lower body) was a late scratch for the Flames. He was replaced by Curtis Lazar. Missing his second game was Kris Versteeg (lower body). … Andersen improved his career record to 5-0-1 against Calgary. … Toronto improves to 13-4-0 when scoring first. … The Flames have led after the first period only three times, the lowest in the league.

UP NEXT:

Toronto: is at Edmonton on Thursday.

Calgary: hosts Arizona on Thursday.