MONTREAL - Playing the spoiler is about the only fun the Montreal Canadiens have left this season.

They were all smiles after a two-goal third-period comeback gave them a 4-3 victory over Detroit on Tuesday night, complicating the Red Wings' bid for a playoff spot.

"I don't want to be Doctor Evil, but I feel that way," said Canadiens captain Max Pacioretty, who scored the game-winning goal. "You know they're going to come out that much harder when they're desperate.

"But you feel a bit better about yourself when you beat a team in that situation."

The setback left Detroit (38-28-11) and Philadelphia tied with 87 points, but the Flyers have two games in hand and own the last Eastern Conference wild-card spot while the Wings sit out of the playoff picture. Detroit is also a point behind Boston for third place in the Atlantic Division.

The Canadiens (35-36-6), already eliminated from the post-season, now hope to topple playoff-bound teams when they play Thursday at Tampa Bay and Saturday in Florida.

"The games we've won through this bad stretch have been against some very good teams," said Pacioretty. "Sometimes you're able to surprise teams like that.

"First-place teams tend to take their foot off the gas late in the year."

The Red Wings, coming off a 3-2 win over Buffalo on Monday night, fell behind on first-period goals by Pacioretty and Paul Byron, but roared back in the second frame with power-play goals by Gustav Nyquist, Anthony Mantha and Mike Green.

Sven Andrighetto tied the game 6:34 into the third and Pacioretty won it with a goal at 11:18.

"It's a tough game to lose, especially being up," said Red Wings rookie Dylan Larkin. "It hurts.

"It was an opportunity, but it's good that Boston lost (2-1 to New Jersey) and we're still only a point behind."

Detroit outshot Montreal 42-27.

Red Wings goalie Petr Mrazek's late-season woes continued as he was pulled in favour of Jimmy Howard for a second straight start at 11:25 of the first period after allowing two goals on seven shots.

Pacioretty tipped in Joel Hanley's point shot at 8:23 and Byron backhanded in the rebound of an Alexei Emelin point shot at 11:25. A recent call-up, Hanley's assist gave him five points in as many NHL games.

The Red Wings struck back in the second. It started when Emelin was given majors for interference and fighting for a hit into the boards that briefly shook up Larkin.

Nyquist picked the top corner with a shot at 12:33 and the rookie Mantha, who had more than 40 family and friends in the seats, scored through a wild scramble in front of Mike Condon at 13:17.

"It was pretty exciting in front of friends and family, but a goal with no win doesn't mean anything," said Mantha.

Green put a wrist shot through traffic and in off the far post at 16:20.

Montreal tied it 3-3 with a man advantage 6:34 into the third period when Andrighetto tipped in the puck.

Markov started a four-way passing play in the Detroit zone the ended with Alex Galchenyuk feeding Pacioretty to score his second of the game on a tight-angled shot.

Mrazek was pulled after allowing four goals on 27 shots against Pittsburgh on Saturday. He was in the Vezina Trophy conversation earlier in the season, but has been yanked five times since Feb. 14.

Notes: Goalie Carey Price, out since Nov. 25 with a lower-body injury, is expected to travel with the team for games Thursday in Tampa Bay and Saturday in Florida. Forward Brendan Gallagher, out since March 5, will also travel and hopes to play in at least one of the games.

Note to readers: This is a corrected story. The Previous version said Detroit was one point behind Philadelphia. The two clubs are tied with 87 points