Sean Monahan scored a power-play goal 35 seconds into the third period and the Calgary Flames beat the New Jersey Devils 3-1 on Wednesday night to move into a Western Conference wild-card spot.

Curtis Glencross scored late in the second period to tie it 1-1, T.J. Brodie added a short-handed, empty-net goal in the final minute, and Karri Ramo made 26 saves as the Flames snapped a three-game losing streak.

Calgary, which lost 1-0 at the New York Rangers on Tuesday, moved one point ahead of idle Minnesota in the playoff race.

Mike Cammalleri scored his fifth goal in four games for the Devils, who had a season-high, four-game winning streak snapped. Cory Schneider made 23 saves, giving up two goals in a 49-second span bridging the second and third periods.

The Devils received a power play with 47 seconds left when Mikael Backlund was called for delay of game, but Brodie scored seven seconds later to ice the game.

Monahan's winner was set up in part when Devils defenseman Jon Merrill took a slashing penalty at the end of the second period.

The Flames kept the puck in the Devils end, and Mark Giordano took a pass fellow defenseman Dennis Wideman, skated to the dot in the right circle, and sent a cross-ice pass that Monahan redirected past Schneider for his 21st goal.

Ramo protected the lead the rest of the way, making power-play saves on Cammalleri and Eric Gelinas, and stopping Tuomo Ruutu coming late on a 3-on-2 rush with less than nine minutes to go.

The Flames, playing the second contest of a seven-game trip, got even 1-1 on Glencross' ninth goal.

Joe Colborne carried the puck into the Devils zone and sent a backhanded pass through the crease to a wide-open Glencross, who redirected the puck under the crossbar. Schneider, who stopped the first 17 Calgary shots, never had a chance.

Cammalleri had given the Devils a 1-0 lead with 2:57 left in the opening period. The former Flames forward picked up a loose puck at center ice, after a turnover by Brodie, and slid a pass to Jordin Tootoo.

Tootoo carried the puck into the Flames end and dropped a pass back to Cammalleri, who beat a screened Ramo with a backhander between the pads.

Cammalleri almost extended the lead late in the second period but his blast from the left wing hit the post.

Schneider, who shut out Arizona on Monday, and Ramo, who played his second game in two nights, were outstanding in the first 40 minutes.

Ramo had excellent saves on Steve Bernier and Tootoo in close on an early power play, and he made a stop on Scott Gomez's drive from low in the right circle midway through the second period.

Schneider stopped Jiri Hudler on a breakaway with 4:11 left in the first period, and he made a snapping glove save on Giordano's slap shot on a power play.

NOTES: Tootoo has points in a season-high four straight games. ... Flames LW Johnny Gaudreau, from Carneys Point, N.J, helped set up Monahan's goal. He is second among NHL rookies in scoring with 15 goals, 29 assists and 44 points, trailing Nashville's Filip Forsberg. ... This marked the first time since 1989 the Flames played the Rangers and Devils on consecutive nights on the road. They will visit the Islanders on Friday. ... New Jersey had at least one point in 14 of its previous 16 home games (11-2-3). ... Calgary hasn't allowed a power-play goal in 13 straight games.