SAN FRANCISCO To find the last time Alex Smith threw for more than 300 yards, you have to go back to Oct. 10, 2010.
It's not a pleasant memory for Smith.
That was the game in which then-49ers coach Mike Singletary national television cameras hovering ripped into the quarterback on the sideline and chants of, "We want Carr! We want Carr!" for backup David Carr coursed through Candlestick Park.
Smith threw for 309 yards that night as San Francisco's second-half comeback against Philadelphia fell short.
If those images marked the low point in his career, Sunday's performance showcased his resurgence.
Smith shoved those bad memories even farther behind with perhaps his best start-to-finish outing since the 49ers drafted him first overall in 2005.
He left midway through the fourth quarter with 303 yards his first 300-yard game in a winning effort and threw for three touchdowns in the 49ers' 45-3 rout of the Buffalo Bills.
If not for two incompletions just before he was removed, Smith would have finished with a perfect passer rating 158.3. As it turned out, he had to settle for a 156.2 rating, by far the best of his career.
"Good throw after good throw," coach Jim Harbaugh said of Smith. "And the protection was excellent. It was a little windy out there, but he was just putting it in pinpointing it. He had a fabulous day."
For the second week in a row, the 49ers (4-1) didn't just beat but bullied an opponent, this time making history along the way:
Their 311 rushing yards and 310 passing yards marked the first time in NFL history a team had 300 yards on the ground and in the air in the same game.
The 621 combined yards set a 49ers franchise best. The previous high, 598 yards, also came against the Bills, on Sept. 13, 1992.
Two pass catchers Michael Crabtree and Vernon Davis had more than 100 receiving yards, and Frank Gore rushed for 106 yards. It was the first time the 49ers achieved that combination since 1961.
Offensive coordinator Greg Roman, whose play calls averaged 9.9 yards a play, said he didn't see Smith's game coming. The quarterback's week of practice didn't stand out, Roman said.
And Smith wasn't exactly sharp Saturday night. He threw out the ceremonial first pitch at the Giants-Reds game, and the ball was outside and skipped in the dirt.
Roman said Smith and the 49ers' coaches laughed about it during the team meeting later that night.
"He said he was working like any smart pitcher or quarterback he was just throwing some junk in there, keeping it low," Roman said archly. "Looking for a grounder, and just using the pitch count to his advantage."
On Sunday, Smith came out throwing strikes.
He had 101 yards by the end of the first quarter and would have had much more had long completions to Davis and Crabtree not been called back because of penalties. Indeed, the 49ers' first half was punctuated by mistakes, including a fumble by last week's star, Colin Kaepernick, at the end of the first half.
The Bills (2-3) recovered with 46 seconds remaining. But instead of running out the clock and trailing 10-3 at halftime, Buffalo tried for a last-second score, a decision that backfired when linebacker Patrick Willis forced a fumble.
On the next play, Smith, who wasn't sacked, went through his reads before finding Crabtree alone for a 28-yard touchdown, and the rout was on.
Throwing out the first pitch at a playoff game? An historic offensive performance on a team that can boast Joe Montana and Steve Young as former quarterbacks?
Smith was asked to reflect on how far he's come since fans were chanting, "We want Carr!"
"It seems like a long time ago," he said. "It was a long time, I feel like. It's a completely different world."