EDMONTON — The Edmonton Oilers hope they have finally found a way to bust out of their slump.

Connor McDavid had three assists as the Oilers handed the New Jersey Devils their first loss on the road this season, coming away with a 6-3 victory on Friday.

Drake Caggiula, Ryan Strome, Oscar Klefbom, Milan Lucic, Leon Draisaitl and Ryan Nugent-Hopkins scored for the Oilers (4-7-1), who snapped a two-game losing skid.

"Tonight was the first time in a while that we had everyone going, and all lines playing well and playing the right way, and we were rewarded," McDavid said. "So it's good to see."

Lucic said that the secret now will be to build off this win.

"We've got to get back to the mode we had last year," he said. "When you win one and you're feeling good about things, you've got to keep it going for as long as you can."

Taylor Hall, Jesper Bratt and Brian Gibbons responded for the Devils (9-3-0), who lost for the first time in four games.

"It seemed like everything kind of went in for them," Hall said. "Passes off skates and everything tonight."

"Two were off shin pads and two were great passes from the best player in the world," added Devils goalie Cory Schneider. "I'm disappointed with their third goal right after we had tied it up. I didn't feel awful, but I didn't play well enough to keep us in the game."

Edmonton started the scoring five minutes into the opening period on the power play as McDavid sent a pass through the crease to Caggiula, who tapped the puck in before Schneider could get across.

The Oilers made it 2-0 three minutes later when an Adam Larsson point shot ended up going off Strome and in.

Hall came back to haunt his old team with five minutes left in the first, as he backhanded the rebound from a Miles Wood shot past Oilers goalie Cam Talbot.

New Jersey tied the game five minutes into the second period as a Bratt spin-around shot hit the post and caromed into the net to make it 2-2.

However, just over a minute later the Oilers regained the lead on a blast by Klefbom on the rush.

Edmonton made it 4-2 with 1:04 to play in the middle frame as a rebound hit Lucic while he was driving to the net and bounced in.

The Oilers added some insurance with seven minutes remaining in the third period when McDavid made a perfect pass to Draisaitl at the side of the net for his third of the season.

The Devils got that goal back just over a minute later on a tip by Gibbons, his team-leading sixth.

Edmonton got an empty-net goal as Hall sent the puck back to the point and almost scored on his own net, leading to a tap-in by Nugent-Hopkins.

Both teams are back in action on Sunday as the Devils wrap up their three-game Western Canada trip in Calgary, while the Oilers finish off a five-game homestand against Detroit.

Notes: The two clubs will meet again on Thursday, Nov. 9 in New Jersey… Devils forward Marcus Johansson missed the game with a concussion suffered on Wednesday in Vancouver… The Devils dressed 11 forwards and seven defencemen