SAN DIEGO (AP) - With Frank Gore getting the night off after signing a big deal, Anthony Dixon capped San Francisco's first two drives with 1-yard touchdown runs and the 49ers beat the San Diego Chargers 20-17 in an exhibition finale Thursday night.
It was a last chance for rookies and other players on the bubble to impress the coaches before the final roster cutdowns on Saturday.
Then it's on to opening day on Sept. 11. The 49ers (2-2), under first-year coach Jim Harbaugh, host the Seattle Seahawks. The Chargers (2-2), heading into their fifth year under Norv Turner, host Adrian Peterson and the Minnesota Vikings.
The Chargers' first-string defense didn't look impressive against the 49ers' running game, allowing 54 yards on the ground on San Francisco's opening drive, which covered 80 yards behind starter Alex Smith. The Bolts have a little more than a week to prepare for Peterson, who set the NFL's single-game record with 296 yards when the Vikings last played San Diego, in 2007.
The 49ers had six sacks.
Gore, who rarely plays in exhibitions, sat out a day after signing a $21 million, three-year contract extension.
Smith was in for the first two drives as the 49ers rebounded from an embarrassing 30-7 loss to Houston.
"I don't know if we had anything to prove," Smith said. "We definitely wanted to get the taste out of our mouth from last week, though. Get some rhythm, convert on some third downs, move some chains and hopefully put points on the board, and we were able to do that.
"We took the opening drive all the way down and stuck it in and were able to get the ball on the turnover and put that one in, as well. So it was a great start," said Smith, who was 8 of 10 passing for 45 yards.
San Diego held out offensive stars Philip Rivers, Antonio Gates, Vincent Jackson and Malcom Floyd.
Running back Ryan Mathews, coming off an uneven rookie season, showed his speed with a 56-yard scoring burst in the second quarter. Earlier, he failed to pick up blitzing NaVorro Bowman, who sacked Billy Volek, forced a fumble and recovered. That set up Dixon's second TD run.
Rookie Jordan Todman also lost a fumble for the Chargers, who missed the playoffs last year because of special teams gaffes and turnovers. Rookie quarterback Scott Tolzien threw an interception and was sacked five times. He also threw a nine-yard TD pass to Seyi Ajirotutu with 1:21 left.
"I liked getting Ryan going," Turner said. "It was good to see him break the long run. I thought he hit some good runs up in there, too. Obviously you can't win in this league if you turn the ball over. I'm disappointed that we had the two turnovers."
The Chargers, in turn, intercepted 49ers rookie Colin Kaepernick twice.
Kaepernick came on early in the second quarter in place of Alex Smith, who led the first two scoring drives. He was intercepted by rookie cornerback Marcus Gilchrist in the end zone.
Kaepernick was picked off later in the second quarter by Dante Hughes on a tipped ball.
Both teams had turned it over to second- and third-stringers by early in the second quarter.