The Chargers stole the game away from the 49ers in the final minutes with a 2-yard Charlie Whitehurst touchdown pass to Eldra Buckley on a 4th and goal from the 2.
The quick score was set up by an inadvertent touch by punt returner Robert Ortiz. The ball bounced and hit Ortiz's foot and was then recovered by San Diego at the 49ers 17-yardline. San Diego twice converted on 4th downs to get the ball in the end zone for the score, and the 20-17 win.
The 49ers could have tried to tie the game in the final seconds, but the 49ers instead went for the win. With two seconds left, quarterback Shaun Hill aired one out for the end zone, but was intercepted.
The 49ers had led the entire second half, following an opening third quarter scoring drive that gave the 49ers a 17-13 lead, their first of the night. Quarterback Alex Smith rebounded from his first-half two interception performance and engineered an 11-play, 90-yard drive. Smith finished off the drive with a pass to tight end Billy Bajema, who made the catch in traffic and then headed a few more yards into the end zone for the 22-yard touchdown.
The Chargers botched a 32-yard field goal as the first half expired, but still led the 49ers 13-10 at the half.
The Chargers earned that lead with 1:06 to go in the second quarter with a Nate Kaeding 35-yard field goal, wrapping up a 10-play, 57-yard drive.
The 49ers had tied the ballgame on the series before at 10 apiece with a 101-yard kickoff return by tight end Delanie Walker. Walker first headed to his left, but running back Michael Robinson blew up his defender out to the right and the tight end reversed his field to take advantage of the open field. Kaeding had the only chance to stop Walker, but he pulled up and let him go.
Kaeding had moments before drilled a 49-yard field goal to finish off a 10-play, 59-yard scoring drive that was set up by an interception by Cletis Gordon of an Alex Smith pass. That field goal had given San Diego a 10-3 edge.
The Chargers led 7-3 over the 49ers at the end of the first quarter with both teams scoring on their opening drives.
San Diego's Billy Volek started and went 6 for 6 for 55 yards on an opening 12-play, 79-yard scoring drive. Jacob Hester had six carries for 23 yards on the drive that was capped by a 6-yard touchdown pass from Volek to fullback Mike Tolbert. The touchdown pass marked the end of the night for Volek.
An illegal celebration penalty backed San Diego to their own 15 for the kickoff that Delanie Walker returned to the 49ers 41-yardline.
Smith started off his first drive with a 23 yard throw to Bryant Johnson. Johnson had another 10-yard catch on the 5-play, 25-yard drive that ended with a 52-yard field goal by Joe Nedney.
The 49ers opted to rest some of their key starters including quarterback J.T. O'Sullivan , running back Frank Gore, cornerback Nate Clements, cornerback Walt Harris, linebacker Patrick Willis, receiver Isaac Bruce, and defensive end Justin Smith.
Tackle Jonas Jennings (hand), safety Keith Lewis (illness), receiver Josh Morgan (illness), returner Allen Rossum (chest contusion), and guard Adam Snyder (ankle) were ruled out prior to the game.
NT Aubrayo Franklin left the game with a knee injury. NT Ron Fields suffered an elbow strain during the first series, but returned to action. LB Jay Moore suffered a biceps injury, and LB Parys Haralson suffered a shoulder injury.