SAN FRANCISCO — The 49ers record book, rich with gaudy numbers, illustrations of offenses designed and implemented by legends, was rewritten Sunday afternoon at Candlestick Park.

It was a collective effort, to be sure, but the primary author was none other than Alex Smith.

So continues the quarterback’s journey from the sharpened end of fans’ pitchforks to the ever-warming regions of their hearts.

Smith directed San Francisco’s offense to a franchise-record 621 yards in a 45-3 rout of Buffalo. He threw for 303 yards and three touchdowns, completing 18 of 24 passes. He ran three times for 49 more yards. He walked off the field in the fourth quarter to a generous ovation and a passer rating of 156.2 (out of a possible 158.3).

“He was just on fire,” offensive coordinator Greg Roman said.

As spectacular as Smith’s statistics were — probably the best game of his seven-year career — his exhibition of adept passing was more impressive.

He made great throws down the field, including a perfect 28-yard touchdown on a post-corner route to wide receiver Michael Crabtree, and was superb on long passes requiring touch and precision, notably a 53-yarder lofted into the hands of tight end Vernon Davis.

Smith’s most impressive throw, however, might have been on San Francisco’s first touchdown, when he improvised and made a gorgeous back-shoulder toss that wideout Kyle Williams snagged for a 43-yard score in the second quarter.

“That was just a great throw by Alex,” Williams said. “He saw that (cornerback Aaron Williams) was on top of me, and he put it in a place where only I could get it. It was a great play by him.”

To those who shrugged off Smith’s contributions last season, insisting he was a “game manager” carried by a terrific defense, this game is a pointed reply.

“Alex was really on the money all day,” coach Jim Harbaugh said. “That was an outstanding job by him. Good throw after good throw after good throw. And the protection was excellent. It was a little windy out there, but he was just putting it in, pinpointing it.”

To those who spent the first month of this season questioning Smith’s ability to throw downfield — even wondering if backup Colin Kaepernick was being groomed as the team’s designated deep passer — this game serves as a compelling rebuttal.

“It’s been a priority for us,” Smith said of the vertical pass. “For whatever reason, it just came up today. There were some shots last week that didn’t happen because of how (the Jets) were playing. Today, (the Bills) came up, we took them and were a little more aggressive.”

Harbaugh and Roman on this day coached as well as Hall of Fame offensive guru Bill Walsh ever did as the 49ers became the first team in NFL history to exceed 300 yards in the air (310) and on the ground (311).

Smith’s play Sunday was as fine as that in any single regular-season game submitted by Hall of Famers Joe Montana or Steve Young.

Some will point to the opponent and say it was only Buffalo, and that Smith got fat off the reeling Bills. There is some truth to that. Buffalo’s defense is built to be exploited. Smith got his. So did Crabtree (six catches for 113 yards), Davis (five, 106) and running back Frank Gore (106 rushing yards on 14 carries).

“Offensively, it could have been even better,” Smith conceded, referring to the penalties that nullified several other long gains.

And, yes, they’re still out there, the Smith skeptics, unwilling to embrace, unprepared to fully accept. But they represent a fringe element now, muted voices in stubborn denial of the mounting evidence.

Harbaugh last season campaigned for Smith’s Pro Bowl inclusion. It was a clear case of bias, of a coach smooching up his own player. Smith last season merely advanced from maddeningly inconsistent to fairly consistent and usually victorious.

That was a significant step, and Smith seems poised to take another.

He’s in the second tier of NFL quarterbacks, behind those who enter every season as legitimate MVP candidates and expect to be named to the Pro Bowl. That first tier — truly elite level — is getting closer by the week, though, and Smith can make significant gains next Sunday, when the defending champion New York Giants visit.

Sure, Smith could have been better. Six of his passes, after all, were not completed. But to dismiss this victory or ignore Smith’s orchestration of it is to disrespect the record book.

He made a variety of throws, pretty much everything in the quarterback catalog, and put up fabulous numbers, while leading his team to a historic victory. There is no fairer means by which to measure the effectiveness of a quarterback.

Contact Monte Poole at mpoole@bayareanewspapers.com. Follow him at twitter.com/1montepoole.