Perry Nelson-USA TODAY Sports

Charlie McAvoy scored in overtime to cap a two-point performance and the visiting Boston Bruins recovered from blowing a three-goal lead to beat the Edmonton Oilers 6-5 in a wild clash Wednesday night.

David Pastrnak and Jake DeBrusk netted a goal and an assist apiece for the Bruins, while Morgan Geekie, Brad Marchand and Trent Frederic each had a goal. Boston goaltender Jeremy Swayman made 37 saves, and Mason Lohrei added three assists.

After the Bruins killed a power play, McAvoy netted the winner 3:10 into overtime by eluding a diving check and sprawling netminder before sliding the puck into the cage for his ninth of the season.

Warren Foegele scored twice, Zach Hyman logged one goal and one assist and Mattias Janmark and Corey Perry tallied once each for the Oilers. Edmonton goalie Stuart Skinner stopped 29 shots, and Connor McDavid and Cody Ceci both notched a pair of assists.

Geekie's power-play goal opened the scoring at 2:34 of the first period when his long point shot hit the top corner for his 10th of the season. Foegele tied the score nine minutes later by driving to the net before depositing a backhand shot.

The Bruins appeared in control thanks to a three-goal second period, starting with Marchand's short-side wrist shot from the left faceoff dot for his 26th of the campaign just 25 seconds into the frame.

Frederic doubled the lead at the 4:40 mark by deflecting a point shot just inside the post for his 16th of the season, and DeBrusk made it a 4-1 count at 13:57 by depositing a rebound for his 13th.

However, Foegele cut the Edmonton deficit to 4-2 at 15:27 when he slid in a backhand shot for his second of the night and 13th of the campaign, setting the stage for a thrilling third period.

Janmark made it a one-goal game at 6:14 of the third by tapping home a loose puck for his third of the campaign. Perry tied the score 70 seconds later with his seventh of the season and third in four games by converting his own rebound.

Pastrnak put the Bruins ahead again at 12:41 of the third period with a shot from the slot for his 36th, but Hyman again pulled Edmonton even 42 seconds later with a rebound tally, his 34th.

The Bruins, who were already without defensemen Kevin Shattenkirk and Hampus Lindholm, lost another when Matt Grzelcyk left the game after taking a first-period slash on the ankle from Ryan McLeod.

More must-reads:

TODAY'S BEST
NFL reporter reveals why CeeDee Lamb isn't rushing to sign new contract
Diamondbacks designate struggling right-hander for assignment
Pelicans expected to promote from within for GM role
Watch: Massive wreck on first lap delays Monaco Grand Prix
Grayson Murray's parents release heartbreaking statement on cause of death
Rangers designate right-hander for assignment
Florida guard among players withdrawing from NBA Draft
Cubs prospect blasts home run after being thrown at
Stars even series with hard-fought win over Oilers in Game 2
Celtics surge late to take 3-0 lead in Eastern Conference Finals
PGA Tour golfer Grayson Murray dies at 30
Another heartbreak for Justin Allgaier as Chase Elliott wins Xfinity Series race
Former Bengals first-round pick announces retirement
Luka Doncic joins trio of NBA champions in exclusive club
Yankees ace takes big step in first rehab stint
Which active NFL players are most likely to make the Hall of Fame?
Bulls' Lonzo Ball opens up about injury that's sidelined him for two years
The most overpaid & underpaid players at every MLB position
How Caitlin Clark, Angel Reese and others' pro starts stack up to WNBA history
Watch: Sun forward Alyssa Thomas ejected after hard foul on Sky's Angel Reese