NEWARK, N.J. — Getting ready to play the Flames, the New Jersey Devils knew they had to stop Calgary's top line of Johnny Gaudreau, Sean Monahan and Michael Ferland if they wanted to win.

They didn't, and they didn't.

Gaudreau scored the go-ahead goal and set up Monahan's second of the game, and the Flames won their third straight with a 3-2 decision on Thursday night.

"We're good friends off the ice and we've been playing together for four years now," Gaudreau said of Monahan after the Flames improved to 15-5-5 on the road. "The chemistry keeps building and building, and it's a lot of fun to play with him. He's a leader and we've been fortunate because there's been less than 20 to 30 games in my career where I haven't played with him."

The linemates weren't the only big contributors for Calgary.

Backup David Rittich made 30 saves, giving Mike Smith a rare night off. He was at his best in the third period when New Jersey held a 12-1 shot advantage.

"It's huge that he has a game like this," said Monahan, who has five goals in his current four-game goal scoring streak. "Smitty has been great for us all year, he's been the backbone of this group, so having Ritter come in and give Smitty a break, that gives our team a ton of confidence."

Taylor Hall and Pavel Zacha scored for New Jersey, which lost its second straight and sixth of nine. Keith Kinkaid made 22 saves.

"One of the biggest things we had to do tonight was shut down their top guys," said Hall, who tallied his 20th of the season. "Their top line is dangerous and they don't need many chances to get one past you. We didn't do that. We made it hard on ourselves. I thought we had a really good third period, but too little, too late."

Calgary scored all its goals in the second period.

After Monahan and Hall exchanged goals in the opening 7:23, Gaudreau put the Flames ahead after getting away with a trip on Nico Hischier as Hall and Jesper Bratt skated up the ice on a 2-on-1.

Instead of shooting, Hall's pass to Bratt was off target and the puck went around the boards. Michael Ferland collected it, found Gaudreau at the Devils' blue line and the New Jersey native beat Kinkaid with a backhander on a breakaway at 14:33 for a 2-1 lead.

Monahan stretched the lead to 3-1 with 1:55 left in the period. After taking a pass from Gaudreau, his initial shot from the left circle hit the goalpost, went into the air and bounced off the helmet of defenceman Andy Greene. Monahan collected the puck low in the right circle and scored his 27th goal and fifth in the last four games.

"We were making some good plays out there and moving the puck around and luckily enough I got rewarded a couple of times," Monahan said.

Zacha closed the gap to 3-2 at 7:23 of the third period with a nifty backhander in close with New Jersey on a power play.

"They had opportunities in the second and scored and we had opportunities in the third period and didn't find a way to put it in the net," Devils coach John Hynes said.

NOTES: Flames RW Michael Frolik played in his 700th NHL game. ... Calgary RW Troy Brouwer was hit in the face by a puck early in the game and missed a portion of the first period. ... LW John Quenneville played with the Devils for the first time this season. It was his 13th NHL game. ... Monahan's single-season mark for goals is 31 in 2014-15. ... This is Hall's fifth 20-goal season. ... Calgary is now 18-2-2 when leading after two periods.

UP NEXT

Flames: At the New York Rangers on Friday night.

Devils: At Columbus on Saturday night.