DENVER -- Philip Rivers outdueled Peyton Manning the hard way.
Throwing for two touchdowns and leading methodical, clock-eating drives to keep the ball away from Denver's explosive offense, the Chargers quarterback led San Diego to a 27-20 upset win over the Denver Broncos on Thursday night.
Rookie wide receiver Keenan Allen caught touchdown passes of 19 and 10 yards from Rivers, who completed 12 of 19 passes for 166 yards passing in helping San Diego (7-7) keep alive its hopes for a playoff berth.
"We converted third downs when we had to," Rivers said. "We didn't make any unbelievable plays, but we made the plays we had to make. It's just kind of how the game went."
San Diego's Ryan Mathews ran for 128 yards and a touchdown on 29 carries. He became the first running back to surpass 100 yards rushing against Denver's defense this season.
"That's an awesome team," San Diego wide receiver Vincent Brown said of the Broncos. "They've already proven what they can do. For us to come in here and do what we did says a lot about us."
Manning, Denver's quarterback, completed 27 of 41 passes for 289 yards passing with touchdown throws of 15 yards and 5 yards to wide receiver Andre Caldwell. However, the Broncos' league-leading offense was held to a season low in points.
"We didn't have our best stuff tonight," Broncos coach John Fox said. "I thought our guys battled back in the second half, but we couldn't get off the field enough on third down and we couldn't stay on the field enough on third down. They had a good plan and executed it."
On the surface, part of the plan was keeping the ball away from Manning and an offense that, coming in, scored at least 25 points in 18 consecutive games, including three games this season in which Denver topped 50 points.
San Diego averaged just under 10 plays in each of its first four scoring drives and finished with a nearly 2-to-1 advantage in time of possession (38:49 to 21:11).
Rivers insisted the Chargers didn't set out to control the clock. That was just the way it worked out.
"I can promise you, we didn't mention one word about time of possession this week," he said. "We mentioned we've got to score. We've got to score touchdowns and not field goals. We didn't do it every time, but we did it a couple of times that were key. We scored 14 points without their offense playing, other than three or four plays before the half."
The Broncos (11-3) saw their 10-game winning streak against fellow AFC West teams end. They also lost for the first time in five meetings with the Chargers.
"We just weren't as sharp as we needed to be," Manning said. "We didn't have the ball that much, and when we did, we didn't do enough with it. Give San Diego credit. It's a division loss. It's disappointing that we got beat by a team that played better than us today."
San Diego stretched its lead to 24-10 when Mathews shook free on a run around left end and bolted 23 yards for a touchdown with 11:06 remaining in the third quarter.
Manning finally got Denver's stalled offense moving, converting a fourth-and-6 play with a 15-yard completion to Caldwell that advanced the ball to the San Diego 16-yard line. Three plays later, Manning connected with Caldwell for their second score of the night, a 5-yard touchdown with 10:25 remaining.
Denver's defense, though, again struggled to get off the field. A third-down pass-interference call against safety Duke Ihenacho, in which he grabbed wide receiver Ladarius Green's jersey, helped extend a San Diego drive.
Earlier in the game, with the Chargers punting out of their end zone, the Broncos committed a neutral-zone infraction to give San Diego a first down. Denver later extended that possession again after being called for having 12 men on the field.
The Broncos got the ball back with 5:50 remaining, but three plays into the possession, Manning was hit as he threw, and the pass was picked off by linebacker Thomas Keiser at the Denver 33-yard line.
The Chargers marched within field-goal range, and Nick Novak kicked his second field goal of the night, a 35-yarder with 2:36 left to play.
Denver added a field goal by Matt Prater with 29 seconds left, but Prater's onside kick failed to travel 10 yards. The Chargers took over and ran out the final few seconds for the win.
San Diego took a 17-10 halftime lead, snapping a tie when Rivers hit Allen for their second touchdown connection of the game with 1:05 remaining in the second quarter. The Broncos failed to get a first down in the second quarter and ended the first half with three consecutive three-and-outs.
Allen, running a fade pattern to the left side of the end zone, gave the Chargers their first lead when he outfought cornerback Kayvon Webster for the pass from Rivers.
Rivers and Allen also teamed up earlier in the second quarter. Allen caught a pass over the middle, and the wideout hurdled Webster inside the 5 and fended off safety Mike Adams' attempted goal-line tackle just enough to cross the goal line.
Before bogging down, Denver moved the ball smartly on its opening possession, with Manning connecting with Caldwell on 15-yard touchdown pass. The teams also traded field goals in first quarter, with Novak kicking a 38-yarder for San Diego and Prater kicking a 32-yarder for Denver.
NOTES: WR Wes Welker, who suffered his second concussion in four games last Sunday, was included among the Broncos' inactive players Thursday night. Also inactive was CB Champ Bailey, who missed his 11th game this season because of a lingering foot injury. ... The Chargers started six different combinations on the offensive line in 14 games. ... Denver WR Andre Caldwell is the younger brother of former Chargers WR Reche Caldwell. ... San Diego WR Keenan Allen leads all NFL rookies with 63 catches. ... The Broncos scored on eight of 14 opening drives this season, tops in the NFL.