INGLEWOOD, Calif. (AP)Brandon Staley knew it was going to take a complete game for his Los Angeles Chargers squad to have a chance at beating the Miami Dolphins. In front of a prime-time audience, the Bolts responded with one of their best games of the season.

Justin Herbert threw for 367 yards and a touchdown and a short-handed 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,” Staley said. ”Defensively we answered all the challenges in the game that we had to face. Justin 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.

”I would say the defenses that we’ve played have been playing exactly what we’ve expected them to play,” Tagovailoa said. ”It really just goes back to the details of how we play our offense, and we’re not all dialed in with that.”

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.

”We knew he loved to throw inside the hashes,” Chargers linebacker Drue Tranquill said. ”He was gonna try to get Tyreek and Jaylen (Waddle) in on those dagger routes, so we definitely packed the middle a little bit and forced him to try to throw it outside.”

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.

”I felt pretty good. I just wanted to be available for the whole game for my team, just make plays and help us come out with the win,” Williams said.

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

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. Keenan Allen had three catches for 32 yards on the drive and finished with 12 receptions for 92 yards.

”I just really felt like that took the air out of them a little bit. Then, for us to make it a two-possession game, that was definitely what we wanted. We would have loved to have scored a touchdown there, but I really felt like we controlled the pace there,” Staley said.

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. 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 to 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.”

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

Hill broke Mark Clayton’s 38-year old Miami mark for receiving yards in a season. Hill has 1,460 yards on 100 catches, while Clayton had 1,389 yards on 96 catches in 1994.

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.

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