With the New Jersey Devils fighting for a playoff spot, Jon Merrill picked the perfect time to score his first NHL goal.

The rookie defenseman connected 2:34 into overtime, and the Devils snapped a two-game skid with a 2-1 win over the Edmonton Oilers on Friday night.

"You always dream of this kind of stuff when you're a little kid," the 22-year-old Merrill said. "After 20 games went by and I hadn't scored, I think those dreams went away a little bit. I knew it would come when it came. Tonight was a good opportunity."

The goal came in Merrill's 31st NHL game and was set up by Adam Henrique winning a battle in the corner and Michael Ryder getting the puck and finding Merrill all alone above the left circle for an uncontested shot against Ilya Bryzgalov.

"I saw that four guys kind of collapsed on Ryds," Merrill said. "I was calling for it and he made a great play. I was walking in all alone and fortunately it went in."

The win was the second in six games for New Jersey (2-2-2), and it ended a slide that saw the Devils lose the last two games in overtime after giving up the lead late in the third period.

"It was awesome for him to get his first goal in overtime," said Henrique, who might have gotten away with a holding-the-stick penalty just before the goal. "It's such an important win for the team. That's one he's going to remember for the rest of his career."

Cory Schneider made 19 saves and Andrei Loktionov scored in regulation for the Devils, who play Saturday night at Washington in their final game before the Olympic break.

Taylor Hall had the goal for the Oilers, who lost for only the second time in seven games (5-1-1). Ilya Bryzgalov made 22 saves for Edmonton, which won't play again until Feb. 27.

"We found different ways to get points in this stretch," defenseman Justin Schultz said. "We got some solid goaltending. We've improved our game against these teams that are battling for playoff spots."

The Devils hit three posts in the game, with Ryder clanging a shot off the crossbar with 9:20 to play.

Both teams went for the win in the final minutes of regulation. Henrique had two chances in close with just more than 4 minutes to go, and defenseman Andrew Ference and Matt Hendricks had chances for Edmonton a minute later.

Schneider stopped a chance in close by Jordan Eberle early in overtime.

With the Devils struggling to score, coach Pete DeBoer shook up his lines for the game and that led to the team's first goal.

Loktionov, who was put at center on Jaromir Jagr's line, opened the scoring at 11:01 with his first goal since Dec. 4.

Jagr and defenseman Bryce Salvador set up the goal. Jagr carried the puck into the Oilers zone and found Salvador on the other side of the ice. He skated toward Bryzgalov and sent a cross-ice pass to a wide-open Loktionov for a shot into an open net.

Jagr's assist was the 1,039th of his career, putting him one behind Marcel Dionne for ninth in NHL history.

The public address announcer had not finished giving out the assists when Edmonton tied the game 29 seconds later.

Hall skated the puck into the Devils end and worked a perfect give-and-go with Nail Yakupov for his 20th goal of the season. Schneider never had a chance to stop the shot into an open net.

New Jersey had plenty of opportunities to take the lead in the second period. Devils defenseman Marek Zidlicky hit the post on a power-play shot and Ryane Clowe hit a post on a breakaway after an Oilers turnover.

Mark Fayne's shot from the point was past Bryzgalov and heading into the net when Ference swept it away from the crease.

NOTES: Schultz played in his 100th NHL game. ... Martin Brodeur has been the Devils' backup goalie the past five games. He has not played since giving up six goals in two periods during the outdoor game against the New York Rangers at Yankee Stadium. ... Devils D Anton Volchenkov missed his second straight game with a lower-body injury. ... Russian Olympian Anton Belov did not play on the road trip.