Trent Dilfer spent years trying to persuade his ESPN co-workers that Alex Smith was actually a supremely talented quarterback.

“They would just laugh at me,” said Dilfer, a Bay Area native and a 49ers teammate in 2007. “I kept telling them, ‘Guys, you’re seeing about 50 percent of what Alex Smith can do. If he ever gets the right coach, he’s going to flourish.’ “

Who’s laughing now?

Smith has the 49ers off to an 8-1 start and ranks among the NFL top 10 in passer rating, completion percentage and fewest interceptions.

All it took was the right coach, Jim Harbaugh, who came along just in time to pull Smith from the wreckage of his six-year career. Suddenly, the quarterback booed by fans, benched by previous coaches and written off by the media is blossoming, seven seasons after he was taken with the No. 1 pick in the 2005 draft.

Smith’s transformation from bust to boom under Harbaugh is one of the most remarkable breakthroughs in sports. It’s as if discovering, after years of Lucy yanking the ball away, that Charlie Brown has been a deadly accurate field-goal kicker all along.

“The only guy who can’t say he’s surprised is Jim Harbaugh,” said Brent Jones, the former 49ers tight end who won three Super Bowls from 1987 to 1997.

“I was one of those people who thought, ‘It might be better if Alex went somewhere else and tried to reboot his career,’ ” Jones said. “I was surprised to see that Jim went so far out on a limb to keep him.”

Dilfer saw it coming, in part because he had an up-close view. He spent the 2007 season in San Francisco, when the 49ers offense was at its dysfunctional worst. The team finished last in the league in points, yardage — and imagination.

In contrast, Dilfer said, Harbaugh and his staff have identified Smith’s strengths and designed game plans accordingly. While recent teams would run, run and run some more before throwing deep downfield out of necessity, the 49ers’ West Coast offense dispatches a complex maze of routes and entrusts that Smith will find the open man.

Smith embraces the complexity. No individual 49ers player ranks among the league’s top 40 for receptions (tight end Vernon Davis is tied for 45th), and Smith has connected with 13 targets. That includes 330-pound defensive tackle Isaac Sopoaga and 315-pound offensive lineman Joe Staley, who were unleashed on trick plays.

“In the past, I really felt like a lot of times I tried to take things on my shoulders,” Smith said. “That was my mindset: ‘I’ve got to go out there and make plays.’ (Now), I really feel like I’m just playing the quarterback position, distributing the football, and finding that those plays just kind of come to me.”

Others, such as Jones, explain the breakthrough not with X’s and O’s but with whys. He said that Smith appears fueled by the confidence he gets from his head coach — a career first. Mike Nolan publicly questioned Smith’s toughness; Mike Singletary once referred to him as “timid.”

And then there is Harbaugh, who lavished praise on Smith even before the quarterback consented to return for another season, a one-year deal for $5 million. Harbaugh’s affection for his quarterback seems to grow by the week. In a widely circulated locker room video after an upset of the Detroit Lions, the coach pumps two clenched fists in the direction of his quarterback. “Clutch!” he screamed. “Cluuutch!”

Such faith is no small thing for a quarterback.

“Look at (Smith’s) body language. He looks so much more confident now,” Jones said. “He’s expecting to complete throws. He’s expecting receivers to be open. There’s not that passiveness anymore.

“Body language might seem like a very minuscule thing, but it’s one of the things players notice. You can only have confidence with success, and he’s having success.”

Smith’s current passer rating (95.8) is by far his career best. No longer trying to force predictable throws, he has only three interceptions in 236 pass attempts. His passer rating in the fourth quarter (117.6) tops the NFL.

Whatever skeptics remained were in further retreat last week after the 49ers, for the first time this season, called upon Smith to carry the bulk of the offensive load. He threw a season-high 30 passes against the New York Giants, a plan in place even before running back Frank Gore left the game early with a knee injury.

Smith responded with 242 passing yards and the go-ahead fourth-quarter touchdown pass as the 49ers won for the seventh straight time.

“I believe Alex Smith can lead this team to a Super Bowl,” former New England Patriots safety Rodney Harrison, now an NBC analyst, said on the air that night. “Trent Dilfer did it, Kerry Collins, Jake Delhomme. You don’t have to be a marquee name in order to lead your team to the Super Bowl.”

Smith’s doubters are quick to note that he will never be mistaken for Joe Montana. He ranks 23rd in the NFL in passing yards and hovers in the middle of the pack with 11 touchdown passes.

But, under Harbaugh, the reasons to question Smith keep fading. Nine games into the season, it has been an all-you-can-eat crow buffet for the people who had written him off. To that point, Dilfer heaps one last bit of praise, noting that Smith has resisted what must be a strong temptation to gloat.

Dilfer recalled a late-night meeting in 2007, when he told Smith his own tale of delayed redemption. Dilfer never lived up to expectations after being the sixth overall pick for the Tampa Bay Buccaneers in 1994. But he went on to help the Baltimore Ravens beat the New York Giants in Super Bowl XXXV — a game played in Tampa.

Dilfer bit his tongue that week, even as he hoisted the Lombardi Trophy.

“I told Alex that story and said, ‘I’m telling you this because one day you’re going to have a chance to say, “I told you so.” Don’t do it. Just stand tall, be humble and talk about your coaches and your teammates,’ ” Dilfer said.

Flash-forward to last Sunday, when Smith stepped to the podium after the latest victory gave the 49ers the second-best record in the NFL.

“I’m not going to sit here and kick anything that happened in the last seven years. I’m thinking about now,” Smith said, smiling. “We’re on a great run. I’ve got a great group of guys in the locker room.

“And that’s all I’m going to worry about.”

Contact Daniel Brown at dbrown@mercurynews.com.