LOS ANGELES — Kailer Yamamoto scored his first playoff goal with 3 minutes, 2 seconds remaining, and the Edmonton Oilers defeated the Los Angeles Kings 5-4 on Saturday night to advance to the second round of the Stanley Cup playoffs.

Klim Kostin had two goals and an assist as the Oilers eliminated the Kings (4-2) for the second straight season. Connor McDavid and Leon Draisaitl also scored in Game 6, and Stuart Skinner stopped 40 shots.

“It’s always so hard, especially in the first round,” McDavid said in an interview on TNT’s postgame show. “L.A. is such a good team. They seem to match up so well against us. And I thought we were resilient throughout the series.”

Next up for Edmonton are the Vegas Golden Knights in the next round. The Oilers won three of the four regular-season meetings, but Vegas won the Pacific Division by two points on the way to the top seed in the Western Conference.

“Already. There’s no time to relax here,” McDavid said in response to when the Oilers begin preparation for the Golden Knights. “Vegas played great in their first round, and it’s going to be a tough series, but we’re looking forward to it.”

Yamamoto notched the game winner after the Kings tied it 7:46 into the third period. Phillip Danault took advantage of Skinner breaking his stick and put in a short-handed goal.

“We like it the hard way sometimes,” Skinner said in his postgame bench interview on TNT. “It was just unfortunate. But the way that we responded, is exactly what you want to do.”

McDavid concurred.

“Obviously, it was a bad bounce to give up the fourth one there,” McDavid said. “But we stuck with it and we got contributions up and down the lineup. It’s definitely a big win here tonight.”

And it occurred in the same building in which Edmonton lost Game 3 last week on a controversial overtime goal that appeared to have been hit by a high stick.

“We’re sure of ourselves,” Edmonton coach Jay Woodcroft said after Game 6. “It’s OK that there’s going to be some drama in the story.”

Kevin Fiala had a goal and two assists for Los Angeles, and Adrian Kempe and Sean Durzi also scored. The Kings have been eliminated in their past four first-round series.

Viktor Arvidsson, who was moved up to the top line for this game, had two assists. Joonas Korpisalo made 21 saves for the Kings, who trailed 2-1 after the first period.

“We wanted a good start. We wanted to get our building into it. We obviously didn’t do that,” Kings defenseman Drew Doughty said. “We didn’t execute great in the first.”

Los Angeles hasn’t won a playoff series since it defeated the New York Rangers in six games in 2014 to capture its second Stanley Cup title in three seasons.

“The progress of this team is good, and we’re moving in the right direction,” Los Angeles forward Anze Kopitar said. “Hopefully, we learn from this and come back stronger next year and make it a better run.”

The Oilers are 27-6 when scoring first in potential series-clinching games, including a 12-3 record when doing so on the road.

“I’m really proud of the guys in front of me. We battled, it was a hard-fought series and L.A. came to play every day,” Skinner said. “We went through adversity this first round … and we were able to find our way through. It was huge.”

The Associated Press contributed to this report.