Four hundred miles away, Mario Lemieux was saying a tearful farewell. Fifteen feet away, there was a small space between John Vanbiesbrouck's pad and the goalpost.

And as his only comparable contemporary was playing perhaps his last game on home ice, Wayne Gretzky found that space and showed just how far he is from the end of his career.With a signature move to shake his defensive shadow, Gretzky fired past Vanbiesbrouck to record his ninth playoff hat trick - the most in NHL history - and give the New York Rangers a 3-2 victory over the Florida Panthers on Wednesday night.

"Some nights you're a little bit lucky, and tonight was one of those nights," he said. "Things like that happen. I guess they used to happen more often like that when I was younger."

The win gives the Rangers a 3-1 lead over the defending Eastern Conference champions in the best-of-7 first-round series. The series returns to Miami for Game 5 on Friday night.

Meanwhile, Lemieux sparked the Pittsburgh Penguins to a 4-1 victory over Philadelphia, fending off a first-round sweep.

In the only other playoff game Wednesday night, Ottawa beat Buffalo 1-0 in overtime to tie their first-round series 2-2.

Gretzky scored three times in a span of 6:23 in the second period for his 58th career hat trick, but first with New York. It was his first three-goal game in the postseason in four years.

"What else can you say about Wayne Gretzky? Seventeen years of this. That's why he's the greatest player that ever played the game," Florida coach Doug MacLean said.

The third goal came on a typical Gretzky move at 9:30 of the second period. As the Rangers rushed up ice, he took Niklas Sundstrom's pass, cut sharply away from Florida defender Ed Jovanovski, then slapped the puck past a screened Vanbiesbrouck.

"The first time, he didn't have the right angle to shoot," Vanbiesbrouck said. "He circled back and found the right angle. I didn't see much of it."

Despite leading the team with 97 points, doubts persisted that the 36-year-old center was nearing the end of his storied career.

"He has a quest to make sure his detractors are never right. Tonight was just one of those oodles and oodles of challenges he's faced," coach Colin Campbell said.

Rob Niedermayer opened the scoring for Florida, beating Mike Richter on a slap shot at 13:23 of the first period. Gretzky tied it at 3:07 of the second on a pass from Brian Leetch, and made it 2-1 at 6:46 on a feed from Luc Robitaille.

"No question about it, he was turned on tonight," said Mark Messier, Gretzky's longtime friend and teammate on the Edmonton Oilers. "He has an uncanny ability to be around the puck every shift when he gets like that. He said before the game he felt fresh."

David Nemirovsky also scored for Florida.

Penguins 4, Flyers 1

Buoyed by two short-handed goals by the Penguins in Pittsburgh, the Mario Lemieux retirement party was put on hold. Lemieux left the ice in tears after what possibly was his last home game, and many fans were crying, too.

Lemieux made the finish more dramatic by scoring on a breakaway with 1:04 remaining, delaying the game as Penguins fans showered the ice with caps - although he was two goals short of a hat trick. After the game, the sixth-leading scorer in NHL history and three-time MVP took a memorable victory lap, a spotlight accompanying him as he waved farewell. The Penguins still trail the best-of-7 Eastern Conference first-round series 3-1, and Game 5 is in Philadelphia on Saturday. Pittsburgh is 0-14-1 on the road since mid-February.

Senators 1, Sabres 0

In Kanata, Ontario, Daniel Alfredsson ended more than 62 minutes of scoreless hockey when he beat Buffalo goalie Steve Shields in overtime to give Ottawa the victory and even their Eastern Conference first-round playoff series at 2-2. Game 5 is Friday night in Buffalo.

Earlier, a malfunctioning video replay machine and a 10-second delay cost the Senators the possible game-winning goal.

Five minutes into the third period, the puck bounced under the pads of Shields during a scramble near the goal.