PITTSBURGH — Clock ticking down on both the game and in some ways their season, the Philadelphia Flyers summoned some more late magic to stun the Pittsburgh Penguins yet again.

James van Riemsdyk scored with 18 seconds left in regulation to force overtime and Sean Couturier finished off a dazzling rush to beat Matt Murray with 3 seconds remaining in the extra period as Philadelphia capped an improbable comeback with a 2-1 victory on Sunday night.

The Flyers kept their fading postseason hopes alive by again surging past the Penguins for the second time in a month.

Three weeks ago it was two goals in the final 3:04 to force overtime before Claude Giroux's winner with 1:59 to go in the 3-on-3. This time the deficit wasn't quite as deep but time was far shorter when van Riemsdyk took a pass from Travis Konecny in the slot and ripped one by Matt Murray's outstretched glove to push it beyond regulation.

"No lead is ever safe, it seems like," van Riemsdyk said.

Not of late, at least when the Penguins are on the other side of the ice. The two teams took turns testing Murray and Philadelphia rookie goaltender Carter Hart in overtime and appeared headed for a shootout before Couturier banked a pass off the sideboard to himself, raced around Pittsburgh star Sidney Crosby then fired a shot from low in the right circle under Murray's right arm and into the net for his 29th and perhaps most important goal of the season.

The win marked the first time in NHL history a team beat the same opponent multiple times in a season in games where they scored a tying goal in the final 30 seconds of regulation. Philadelphia moved within six points of Columbus for the Eastern Conference's second wild card with nine games to go in the regular season. Odds are slim, but they would have been all but gone if van Riemsdyk hadn't found room in the middle of the Pittsburgh zone.

"If we don't win tonight, that's a huge hole," Philadelphia coach Scott Gordon said. "We're definitely running out of time. It was a game that we definitely needed the two points and got a lot of big performances in the end there."

Teddy Blueger, starting on the second line in place of injured Evgeni Malkin, scored Pittsburgh's lone goal as the Penguins managed just one point out of a pair of home games during the weekend.

Pittsburgh's stretch run might not include Malkin, who head coach Mike Sullivan said is "week to week" with an upper-body injury. Malkin collided with St. Louis defenseman Robert Bortuzzo in a loss to the Blues on Saturday. He remained in the game and played more than 19 minutes but just over 24 hours later his familiar No. 71 was nowhere to be found.

"He's a tough guy to replace, he's an elite player, that speaks for itself," Sullivan said. "We'll take it game to game and see how it goes."

Murray, who was pulled after allowing four goals on 13 shots against the Blues, bounced back by making 36 saves but faltered late, as did the play in front of him.

"It's tough," Murray said. "Every point is valuable. It stings for sure."

Facing Pittsburgh for the first time in his career, the 20-year-old Hart was spectacular. He turned away 41 shots — including several opportunities from in close — to win for the first time since returning from an upper-body injury that sidelined him from Feb. 23-March 11.

"For us to come back like that in the third period, it feels like we've almost done it in every game against these guys," Hart said.

The Flyers appeared to take the lead 1:06 into the second period when Giroux's wrist shot from the right circle got through Murray. The on-ice officials, however, immediately waved it off, ruling Jakub Voracek interfered with Murray as he skated by the crease as the shot closed in. The Flyers challenged the call, and it was overturned by replay officials. Pittsburgh then challenged the goal on the grounds that Voracek was offsides when the play entered the zone. The call was then overturned a second time, leaving the game scoreless.

Got it?

Goal or no goal, it was one of the few times the Flyers truly tested Murray through the first two periods. The Penguins tilted the ice heavily at times, swarming Hart with extended pressure. Finishing, however, was another matter. If Pittsburgh wasn't shooting wide — as Nick Bjugstad did on a breakaway in the second period — then Hart was making an indelible first impression in one of the NHL's most testy rivalries.

""He was great," Couturier said of Hart. "That's what you want from your goalie...We had to step up for him."

NOTES: Kessel playing in his 319th consecutive game with Pittsburgh, tying Craig Adams' franchise record. Kessel has played in 765 straight games overall, the eighth-longest in NHL history. ... Pittsburgh's successful replay challenge marked the 8th time in 14 tries the Penguins have won a challenge this season. ... The Flyers were 0 for 3 on the power play. The Penguins were 0 for 4.

UP NEXT

Flyers: Host Montreal on Tuesday.

Penguins: Begin a four-game road trip on Tuesday in Carolina.