INGLEWOOD, Calif. (AP) — Justin Herbert threw for 367 yards and a touchdown and a short-handed Chargers defense got the best of the Dolphins’ Tua Tagovailoa as Los Angeles beat Miami 23-17 on Sunday night.

The Chargers (7-6) moved into position for the final AFC playoff berth, ahead of the New York Jets. Their hold though would be short lived if New England beats Arizona on Monday night.

“It was an incredible team win,” coach Brandon Staley said. “Defensively we answered all the challenges in the game that we had to face.

“Justin was fantastic and definitely led the way for our team. He made a lot of winning plays and really made good decisions throughout the game.”

Herbert — the sixth overall pick in 2020, one behind Tagovailoa — completed a career-high 39 passes on 51 attempts for his 21st 300-yard game. He became the first NFL quarterback to throw for 13,000 yards in his first three seasons.

“There were a lot of good things from all three phases. The defense did an incredible job,” Herbert said.

Tyreek Hill scored two touchdowns for the Dolphins, one of them on an improbable recovery of Jeff Wilson Jr.’s fumble that Hill took 57 yards to the end zone. But Tagovailoa had his worst game as an NFL starter, completing 10 of 28 passes for 145 yards and a touchdown as the Dolphins (8-5) lost their second straight.

“They played to what they’re good at, and we just didn’t execute,” Tagovailoa said. “It was very disappointing for us to go out there as an offense and show what we showed. That’s not to our standard.”

The Chargers held Miami to 219 yards despite not having safety Derwin James, cornerback Bryce Callahan and defensive lineman Sebastian Joseph-Day because of injuries. The Dolphins came in with the league’s top-ranked pass offense.

LA’s offense was buoyed by the return of Mike Williams, who had missed four of the last five games with a high ankle sprain. Williams had six catches for 116 yards, including a 10-yard touchdown while getting both feet in bounds near the back of the end zone to extend the Chargers’ lead to 10-0 early in the second quarter.

Austin Ekeler, who finished with 104 scrimmage yards, had a 1-yard run off left tackle with 18 seconds left in the quarter to extend the lead to 17-7.

Keenan Allen added 12 receptions for 92 yards.

Cameron Dicker kicked three field goals, including one from 29-yards that gave the Chargers a 23-14 advantage with 2:40 remaining. Dicker’s kick capped a 17-play, 79-yard drive that took 8:39 off the clock.

Hill finished with four catches for 81 yards, including a 60-yard TD in the third quarter on Tagovailoa’s best throw of the night, and became the Dolphins’ single-season leader in receiving yards. Chargers cornerback Michael Davis slipped in coverage at the LA 40, allowing Hill to make an easy catch and saunter untouched to the end zone to get Miami within 17-14.

Miami’s Jason Sanders booted a 55-yard field goal with 1:10 remaining, but Los Angeles recovered the onside kick and ran out the clock.

“That’s hard to take. There’s a lot of investment, and it’s not good enough,” Dolphins coach Mike McDaniel said. “I thought the defense played well enough for us to win. There’s stuff we can clean up, for sure. There’s a multitude of things.”

SCOOP AND SCORE

The Dolphins had 5 net yards and one first down on their first three possessions before finally getting on the scoreboard, thanks to Hill.

On second-and-4 from the Miami 41, Wilson fumbled while tackled by Chargers safety Alohi Gilman during a 6-yard gain. There was a scramble for the loose ball until Hill picked it up, changed direction and quickly sprinted to his right and up the sideline.

Hill became the only player in the Super Bowl era to score TDs via receiving, rushing, kick return, punt return and fumble return.

RECORD BOOK

Ekeler finished with eight receptions for 59 yards. His third catch moved him past Kansas City’s Kimble Anders (369) for the most by an undrafted running back in the common draft era. Ekeler now has 375 receptions in his six-year career.

INJURIES

Dolphins: Wilson suffered an ankle injury during the second quarter. Safety Eric Rowe had a hamstring injury in the third quarter.

UP NEXT

Dolphins: At Buffalo next Saturday night.

Chargers: Host Tennessee next Sunday.

___

AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP_NFL