LOS ANGELES (AP)Alexander Edler scored the tiebreaking goal early in the third period, and the Los Angeles Kings closed in on their first playoff berth in four years with a 4-2 victory over the Anaheim Ducks on Saturday night.

Arthur Kaliyev, Matt Roy and Alex Iafallo also scored, and rookie Quinton Byfield and Anze Kopitar had two assists apiece in the Kings’ fourth straight victory. Jonathan Quick overcame an egregious misplay and made 19 saves in Los Angeles’ second win in five days over Anaheim in the Freeway Faceoff rivalry series.

With five victories in six games, the Kings have solidified their hold on third place in the Pacific Division. Los Angeles has two games left and is seven points ahead of the Vegas Golden Knights, who have four games left.

”It’s definitely amazing, and I think we’ve worked all year for this,” Byfield said. ”I think we are where we want to be – win and you get in. You don’t want to leave it up to anyone else, so it’s a great feeling right now. A lot of guys haven’t been there, and I think it’s going to be a great experience. We have a lot of veterans as well who’ve been there, and they’re going to show us the way.”

The Kings are just two points behind Edmonton for second place in the Pacific Division, but the Oilers have two games in hand.

Trevor Zegras became the top rookie scorer in Ducks history with his 58th point on a second-period goal in Anaheim’s 18th loss in 21 games. Gerry Mayhew scored on that spectacular goaltending mistake by Quick, and Anthony Stolarz stopped 36 shots.

”Our guys are playing as hard as they can,” Anaheim coach Dallas Eakins said. ”It’s certainly not any fun going down the stretch like this, but I do give our guys credit. They’re sticking together. We’re in games against playoff teams. We can’t ask much more.”

Los Angeles fell behind 2-1 midway through the second period when Mayhew got credit for the Ducks’ go-ahead goal because Quick comically whiffed on a bouncing puck dumped toward him by Mayhew from the neutral zone.

”With Quickie’s play for us, maybe it was better that it went in that way than a real good play, because the guys buckled down and wanted to play for him,” Los Angeles coach Todd McLellan said. ”It’s a sign of a good team and guys playing for one another, so we got through it.”

Roy evened it 2 1/2 minutes later with his second goal of the season on a long shot through traffic. Kopitar picked up his 700th career assist.

The Kings reclaimed the lead with 13:39 to play when Byfield won a draw to Edler, whose long shot ricocheted off Isac Lundestrom and caromed past Stolarz.

Iafallo added an empty-net goal before a major fracas occurred with 5.7 seconds to play. Ducks captain Ryan Getzlaf took down Kaliyev after the Los Angeles forward checked Anaheim’s Josh Mahura in the head from behind.

Earlier, Getzlaf got a lengthy ovation from the fans of his team’s biggest rivals during the first period of his penultimate NHL game. The 17-year veteran will finish his career Sunday at Honda Center against St. Louis.

The 36-year-old retained the feisty spirit of this local derby to the end: When Los Angeles’ Carl Grundstrom ran into Stolarz and knocked him down in the second period, Getzlaf pursued Grundstrom and checked the Kings forward up onto the glass in response.

Anaheim tied it early in the second on a wrist-shot goal by Zegras with help from Getzlaf’s 736th career assist, the 49th-most in NHL history.

Zegras, the Ducks’ creative center and Getzlaf’s playmaking heir, surpassed Bobby Ryan’s rookie record for Anaheim in the 2008-09 season. He said the record means ”not a whole lot, to be completely honest.

”I think individual records come from good teams, and I can’t score out there by myself,” Zegras added. ”I played with a lot of good players since I’ve been here. Some are still here, some are gone, so I think it’s a compliment to them. But it doesn’t mean a whole lot to me.”

Anaheim forward Derek Grant left in the first period with an upper-body injury.

UP NEXT

Ducks: Host St. Louis on Sunday.

Kings: At Seattle on Wednesday.

More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports