11/23/2014 01:16 EST | Updated 01/22/2015 05:59 EST

Hudler scores late in regulation and in shootout as Flames beat Devils

CALGARY - There is no quit in the Calgary Flames.

Curtis Glencross scored twice and Jiri Hudler had one goal along with the shootout winner as the Flames staged a late rally to beat the New Jersey Devils 5-4 on Saturday night.

Down 4-2, Flames coach Bob Hartley pulled goaltender Karri Ramo with 3:33 remaining in the game. It worked, as Calgary pulled to within one when Hudler scored from the side of the net with 2:22 left.

Ramo returned to the net briefly before heading to the bench again and, while it took until the very end, Glencross ended up with the puck in the slot and scored his second of the game with just five seconds to go.

"Never mind the grey hair, I'll have to get my heart checked," quipped Flames head coach Bob Hartley. "I don't know how they do it but we found a way again. We're not making it easy but we're making it interesting."

The Flames are 5-6-0 when trailing after two periods. The five victories leads the NHL, two more than anybody else. Last year the Flames were 4-27-2 facing that scenario.

"That's a fun third period to play," said Glencross. "You don't want to be down a couple goals like that going into the third, but we did a great job in the third period. We got lots of shots, lots of traffic in front of the net and finally capitalized on our opportunities."

The last time the Flames won a game in which they trailed by two or more goals in the final three minutes was Mar. 13, 1999. It is also the first time in team history Calgary has scored two goals with the goalie pulled for an extra attacker.

Expected to challenge for the team lead in goals this year, Glencross entered the night with just two on the season and just one in his last 18 games.

"Definitely some relief," said the 31-year-old Glencross, who is a pending unrestricted free agent at season's end. "Everyone could have seen it. I think even more relief after the second one.

"It's been a rough little go, usually I have more goals than assists but it's the complete opposite. But, you know what, it doesn't really matter, we're putting up two points and look at us in the standings. We're in a good spot and have to keep moving forward."

Josh Jooris also scored for Calgary (13-7-2), who finished 4-1 on a five-game homestand. The Flames sit second in the Pacific Division, one point back of Anaheim, who they will face Tuesday night in their next game when they begin a three-game road trip.

Adam Henrique, Mike Cammalleri, Travis Zajac and Tuomo Ruuto scored for New Jersey (9-9-3). The Devils are 1-1-1 on their four-game road trip which wraps up Tuesday in Vancouver.

"That's no good," said Cammalleri. "They obviously did a good job. They kept coming. We've got to counter a bit better there at the end. Tough one.

"It just doesn't feel good when that happens. Those guys have been making a habit of it. Kudos to them to keep coming. For us, we'd like to be able to lock those games down."

In the shootout, Sean Monahan and Cammalleri exchanged goals in the first three shooters, setting the stage for Hudler, who whipped a shot past Devils goalie Scott Clemmensen to put Calgary ahead. Ramo clinched the improbable victory by stopping Zajac.

"It was right there for us," said Clemmensen, who made his first start of the season. "Obviously a disappointing outcome. Had we won in the shootout it would've lessened the pain of giving up two goals late."

Cammalleri said it was a fun game to be a part of.

"A lot of fun. I thought it was an entertaining game for everybody," said Cammalleri, who played four seasons with Calgary. "There was definitely no shortage of chirps from the other team. I was getting it left, right and centre."

Down 3-1 entering the third, the Flames got back to within a goal at 3-2 at 2:26 on a power-play goal by Jooris, the fifth of the year for the 24-year-old rookie.

However, Ruutu restored the Devils' two-goal cushion at 10:26.

The Flames have outscored teams 30-13 in the third period.

"It was a party out there," said Hartley. "Once we scored that third goal 6-on-5, it was electric on the bench. The guys believed that they could make a difference. "

For the third straight game, Calgary fell behind 2-0 early on goals from Henrique and Cammalleri.

Calgary cut into that deficit at 10:18 of the second when Glencross intercepted a puck in the slot, spun and whipped a shot past Clemmensen for his third of the year.

The Devils took a 3-1 lead with eight seconds left in the second period. Henrique's shot hit the crossbar, hit Ramo in the leg and bounced out to Zajac, who buried his fourth of the season.

Clemmensen started in place of Cory Schneider, who had started each of New Jersey's first 20 games. The 37-year-old longtime back-up finished the night with 33 stops.

Ramo had 25 stops for Calgary. He improved to 4-2-1 on the season.

Notes: The Flames are 8-0-1 in games following a loss... Ferland's assist was his first NHL point... Flames LW Brandon Bollig was a healthy scratch for the second time in the past five games... Corban Knight made his season debut for the Flames. Called up from Adirondack (AHL) on Friday, he played seven NHL games last year... Calgary RW Devin Setoguchi has gone 26 games without a goal, a streak that dates back to last year with Winnipeg.... The Flames have only held the lead after the first period three times. They're 3-0-0 in those games.