DENVER (AP) — Russell Wilson threw three touchdown passes, Justin Simmons forced two fumbles and the Denver Broncos dodged a franchise-worst 13th loss with a 31-28 victory over the playoff-bound Los Angeles Chargers on Sunday.

The Chargers (10-7) knew before kickoff they were locked into the fifth AFC playoff seed with a first-round game looming at Jacksonville, but coach Brandon Staley played his starters anyway, a decision that could prove costly.

Joey Bosa had a sack in the first half, but appeared to be limping around the sideline afterward. The Chargers (10-7) announced no injury to Bosa and declined to give a reason for his absence the rest of the game, and wide receiver Mike Williams left with a back injury in the first half.

Justin Herbert warmed up for his first playoff appearance with another solid outing — 25 of 37 for 275 yards, two TDs and no interceptions.

Wilson finished 13 of 24 for 283 yards, three touchdowns and an interception, and Jerry Jeudy capped a month-long surge with a career day that featured 154 yards on five catches and 39 yards on three rushes.

With the win, the Broncos (5-12) avoided their first winless run in the AFC West in a non-strike year since divisional play began in 1970. They also handed interim head coach Jerry Rosburg his first win after four decades as an assistant.

Rosburg, 67, took over two weeks ago when Nathaniel Hackett was fired. On Monday, he’ll return to the hyperbaric oxygen therapy venture he was involved with before GM George Paton lured him out of retirement this season to serve as a senior assistant to Hackett.

And the Broncos will continue their search for their fifth head coach since they won Super Bowl 50 seven years ago. On deck are interviews with Jim Harbaugh and Sean Payton.

After struggling all season under Hackett, Wilson had his best two games of the season with Rosburg in charge, including last week’s 27-24 loss at Kansas City.

Wilson got off to a slow start Sunday — he completed just three of his first nine throws for 16 yards when the Broncos got the ball at their 25 trailing 17-10 with 26 seconds left before halftime.

Instead of burning the time and heading into the locker room satisfied to be in it, Wilson found Latavius Murray for 15 yards, unleashed a 57-yard heave to Jeudy and hit Eric Tomlinson from 3 yards out to tie it at 17 with 6 seconds remaining in the half.

Wilson found running back Tyler Badie from 24 yards out to give Denver a 24-17 lead on the opening drive after halftime and added a 24-yard TD throw to Courtland Sutton that made it 31-20.

Broncos punt returner Brandon Jackson’s muff gave the Chargers life and backup QB Chase Daniel responded with a 3-yard TD toss to Keenan Allen, then hit Joshua Palmer with the 2-point conversion to make it 31-28.

INJURIES

Broncos CB K’Waun Williams left in the first half with a concussion, and WR Freddie Swain left with a hip injury after hauling in a 54-yard pass in the second half.

UP NEXT

Chargers: Headed to the playoffs for the first time since 2018 and will face the surging Jaguars, who have won five in a row.

Broncos: Will be speaking with Payton, who’s still under contract with the Saints for two more years, and Harbaugh, among several others as they pick up the pieces from their sixth straight losing season.