Drew Lock hit rookie KJ Hamler from a yard out and no time on the clock and Brandon McManus nailed the extra point to give the Denver Broncos a shocking 31-30 win over the hard-luck Los Angeles Chargers on Sunday.

The Broncos (3-4) overcame a 24-3 deficit and rallied after being held to just 60 first-half yards, including 2 on the ground.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

The Chargers (2-5) appeared primed to end their seven-game AFC West losing streak behind another great performance by rookie Justin Herbert, who joined Deshaun Watson as the only QBs in NFL history with four straight games with three TD passes.

But the Chargers became the first team to lose three games they led by 17 or more points in the same season since the Atlanta Falcons did it in 2003.

The Broncos got the ball at their 19 with 2:24 remaining and Lock drove them 81 yards in 14 plays, helped by two defensive flags.

On fourth-and-4 from the 18 with 7 seconds left, Lock’s pass to rookie tight end Albert Okwuegbunam was incomplete but defensive back Brandon Facyson was whistled for pass interference, giving the Broncos the ball at the 1 with 1 second remaining.

Lock took the snap, rolled right and found Hamler in the back of the end zone. He got both feet down before going out of bounds with no time left.

After a review, the touchdown stood and McManus nailed the PAT. The Broncos’ celebration was muted for a few seconds because there was both a flag and a scuffle on the field.

Finally, the officials announced the penalty was on Los Angeles for lining up seven men on one side, an illegal formation that was declined, sealing Denver’s comeback from a 24-3 second-half deficit.

After a slow start that included an interception, two punts and a turnover on downs, the Chargers got two quick 80-yard touchdown drives in the final 1:48 of the first half to take a 14-3 halftime lead.

Herbert hit Kennan Allen for a 9-yard score to make it 7-3 and Denver went three-and-out. Sam Martin’s punt traveled 69 yards — 9 yards more than Denver’s offense managed in the first half — but bounced over the right pylon for a touchback.

Herbert then directed another 80-yard drive, this one taking less than a minute and including a 36-yard throw to Mike Williams to the Denver 2 on rookie cornerback Michael Ojemudia with 22 seconds left.

Chris Harris Jr., who didn’t face his former team because of a lingering foot injury, tweeted, “Yessir, pick on that rookie lol.”

One play later, Herbert rolled right, stopped and fired a 2-yard touchdown strike to fullback Gabe Nabers.

CLICK HERE TO GET THE FOX NEWS APP

COVID CONCERNS

Both teams’ work weeks were interrupted by the novel coronavirus with Chargers backup guard Ryan Groy and Broncos starting right guard Graham Glasgow both going on the COVID-19/reserve list. Groy had started the past three games at right guard for Trai Turner (groin). The Broncos also were without two assistant coaches who were under COVID-19 protocols: defensive coordinator Ed Donatell and offensive line coach Mike Munchak.

UP NEXT:

Chargers: host the Los Vegas Raiders on Sunday.

Broncos: Visit the Atlanta Falcons on Sunday.