Updated

Letting a two-goal lead get away didn't deflate the Canadiens.

Andrei Markov scored 4:22 into overtime on a power play as Montreal recovered to defeat the New Jersey Devils 4-3 on Sunday night.

Markov was at the edge of the crease and lifted the rebound of Rene Bourque's shot off the end boards into an open side for his fourth goal. The Canadiens went on the man advantage after Andy Greene took down Erik Cole at 4:01.

Brendan Gallagher scored his first NHL goal and linemate Brandon Prust got his first with the Canadiens. Ryan White also scored for Montreal.

"We played against a good hockey team that hadn't lost and that went to the Stanley Cup final last season, so it was a good measuring stick for us," said Montreal coach Michel Therrien. "We showed a lot of resilience."

The Canadiens took a 3-1 lead early in the third period, but David Clarkson scored on a power play and Dainius Zubrus tied the game at 13:02. Patrick Elias scored and had two assists to reach 900 career points.

"Considering we didn't play 60 minutes ... we'll take the point," Devils coach Peter DeBoer said. "And, thank Marty Brodeur."

The Canadiens posted a rare win over veteran goalie Brodeur, who is 43-19-5 against Montreal in his career.

Montreal had a 32-25 shots advantage, including 16-7 in the opening period when they took a 2-0 lead.

The Canadiens were first on the puck from the outset and scored 2:25 into the game when Alexei Emelin's shot was tipped by Travis Moen and went off Brodeur to White for his first of the season.

Emelin flipped the puck to the far blue line where Greene lost it to Galchenyuk, who slipped a pass into the slot for the onrushing Gallagher to fire into an open side at 13:35. It was a first goal in three NHL games for the 20-year-old.

"To get that first one is something you remember," Gallagher said. "Alex made a great pass. He looked off the D-man and put it right where it had to be. I just had to put it on the net."

The roles reversed in the second period as New Jersey camped out in Montreal's end and got a goal at 3:26 when Elias tipped a Mark Fayne pint shot past Carey Price after some strong work in the corner by Clarkson.

Galchenyuk intercepted a clearing attempt and slipped the puck ahead to Prust to bat in two minutes into the third period.

"We've got to keep doing the same thing — keeping it simple out there, moving pucks and hunting down pucks," Prust said. "That's what made us successful."

But Galchenyuk and Prust were both off for high-sticking when Clarkson banged in an Elias feed during a two-man advantage at 5:23.

Zubrus tied it at 13:02 on a feed from behind the net by Elias.

Notes: Montreal was without left winger Max Pacioretty, who was released from hospital Sunday after an appendectomy. He will be out 3-4 weeks. Lars Eller moved into his spot. . . Galchenyuk for Montreal and Stefan Matteau for New Jersey each played a fourth game. They can play one more before their teams must decide whether to send them back to junior