Ryan Mathews and Nate Kaeding led the San Diego Chargers to a 33-28 win at Denver on Sunday, handing the Broncos their franchise-record 12th loss.

The Broncos (4-12) had never lost a dozen games in any of their 51 seasons, but by dipping to new depths, they managed to secure the No. 2 overall draft pick as they embark on a major makeover following the Josh McDaniels misadventure that included a bevy of personnel mistakes and a videotaping scandal.

Philip Rivers beat the Broncos for the eighth time in 10 tries, but San Diego (9-7) also missed the playoffs, ceding the AFC West title it had won four straight seasons to the upstart Kansas City Chiefs.

Mathews, San Diego's highly touted rookie who dealt with injuries and inconsistency throughout the season, gained 120 yards on 26 carries in his first 100-yard performance and scored on runs of 27, 12 and 31 yards.

Kaeding kicked four field goals before his miss from 53 yards in the fourth quarter ended his 16 for 16 streak in Denver.

The Broncos face a critical offseason beginning with the return of Hall of Famer John Elway, who is expected to rejoin the franchise by midweek as its chief football executive, a person with knowledge of the negotiations told The AP.

Denver has just one playoff win since Elway retired a dozen years ago after winning two straight Super Bowl trophies, and the Broncos haven't been to the playoffs in five years.

Elway's first order of business will be to find a new field leader and interim coach Eric Studesville, who was promoted from running backs coach when McDaniels was fired Dec. 6, has the first interview for the full-time gig.

He went 1-3 in his audition but provided the tarnished team with a fresh face and voice during the final month of the team's worst season in four decades.

Broncos star cornerback Champ Bailey missed what could be his farewell game with a bruised right heel.

After falling behind 33-16 midway through the fourth quarter, the Broncos nearly pulled off a big comeback for the second straight week.

Undrafted rookie Cassius Vaughn returned the kickoff 97 yards for a score to pull Denver to 33-21 with 7:42 left, and Tim Tebow scored on a 6-yard TD run with 26 seconds left.

Kicker Steven Hauschka's onside kick bounced around and Denver tight end Richard Quinn emerged from the pile with the football, a fitting conclusion to San Diego's terrible season on special teams.

That gave Denver the ball at its 40 with 23 seconds remaining, but Tebow's two desperation heaves were knocked down near the goal line.

Tebow, who ran for 94 yards, gave Denver a 7-0 lead when he hit a wide open Pro Bowl receiver Brandon Lloyd from 14 yards.

San Diego, however, scored on its next five possessions to take a 26-7 lead.

Mathews' season-long 27-yard run tied it and Kaeding was good from 42, 45 and 47 yards for a 16-7 halftime lead.

Kaeding's second field goal capped a drive in which wide receiver Vincent Jackson sprained his left ankle while hauling in a 26-yard pass while on his back after the ball was tipped by cornerback Perrish Cox.

Mathews' 12-yard TD run followed Quentin Jammer's interception of Tebow's first second-half throw and made it 23-7.

Tebow gave the Broncos hope with a 6-yard scoring pass to fellow rookie Eric Decker late in the third quarter, but Tebow's keeper on fourth-and-2 at midfield came up short early in the fourth, and Mathews rumbled in from 31 yards for a 33-16 lead.

The Broncos lost for the fifth time at home despite a season-best five sacks after coming into the game with just 18.

This was the end of a dismal year in Denver that began with league sacks champion Elvis Dumervil suffering a season-ending injury in training camp and included the suicide of wide receiver Kenny McKinley.

McDaniels' 22-month reign ended Dec. 6 when the brash 34-year-old was fired from his jobs as coach and de facto general manager amid the team's worst slide in 40 years and the embarrassing Spygate II videotape scandal.

Linebacker D.J. Williams was stripped of his captaincy after his second drunken driving arrest and Cox faces a sexual assault charge that carries a sentence of up to life in prison.