EDMONTON, Alberta (AP) The Edmonton Oilers did what they had to do for coach Todd McLellan.

Taylor Hall scored in overtime and the Oilers beat McLellan's old club, the San Jose Sharks, 4-3 on Wednesday night for their fourth straight win.

Jordan Eberle said the players wanted to give McLellan a victory against a Sharks team that he coached the previous seven seasons. They coughed up two leads and had to battle back with a late goal to force overtime, but in the end, they accomplished their goal.

More from FoxSports

''We wanted to win for him,'' Eberle said. ''We were kind of hesitant and it wasn't our best game, but when we needed to push back and score, we did, and we got the two points and kept our streak alive.''

Eberle, Leon Draisaitl and Iiro Pakarinen also scored for the Oilers.

McLellan said the game was a stressful one, but not because of watching San Jose from a different view point.

''There were some ups and downs,'' he said. ''We went from a high to a low and frustration on mistakes. I was really happy with the execution on the tying goal. In overtime I was still angry because I thought they had too many men on the ice as we were scoring. That kind of sums up my night.''

Draisaitl set up Hall's winner, feeding the winger a pass on a 2-on-1 that Hall tipped in for his 12th of the season.

Pakarinen made it 3-3 with 4:37 left. He took a shot from the top of the circle that goalie Martin Jones didn't see.

The Sharks lost their fifth straight. Justin Braun, Patrick Marleau and Joe Pavelski scored for San Jose.

''I was real happy with our effort, I thought we could have had two or three in the first and we came ready to play,'' Sharks coach Peter DeBoer said. ''For us playing back-to-back and four in six nights, I thought we gave a hell of an effort and probably deserved better.''

After a scoreless first period, Edmonton finally put a goal on the board 6 minutes into the second when Teddy Purcell made a nifty pass at the blue line to Draisaitl, and he beat Jones through the legs for his ninth of the season on a partial breakaway.

The Sharks tied the game 4 minutes into the third period. Braun was able to beat Oilers goalie Anders Nilsson with a backhand shot through traffic for his first goal in 68 games.

The Oilers made it 2-1 8 minutes into the third when rookie Jujhar Khaira fed it in front to Eberle, who spun around and sent a no-look backhand shot top shelf for his third goal in as many games.

San Jose tied the game again with 9 minutes remaining when Tomas Hertl found Marleau at the side of the cage and he netted his 11th of the season.

The Sharks then took the lead 1 1/2 minutes later when Pavelski was left alone in front and was able to bat in the puck from mid-air from the edge of the crease.

Notes: The Sharks scratched Ben Smith (concussion) and Marc-Edouard Vlasic (lower body). ... Connor McDavid (collarbone), Rob Klinkhammer (leg), Nail Yakupov (ankle), Benoit Pouliot (lower body) and Andrew Ference (undisclosed) sat for the Oilers. ... Edmonton wraps up its five-game homestand on Friday against the New York Rangers. The Sharks return home to face the Minnesota Wild on Saturday.