Click photo to enlarge
San Francisco Forty-Niners head coach Jim Harbaugh during the Forty-Niners first practice of the season at the Forty-Niners training facility in Santa Clara, Calif. on Friday, July 29, 2011. (LiPo Ching/Mercury News)

During Jim Harbaugh's first season as the Raiders' quarterback coach, Rich Gannon won the league's MVP award and led the team to the Super Bowl.

But it wasn't until the next season -- a wretched string of defeats and mounting internal hostility -- that Gannon recognized he was in the presence of a future NFL head coach.

The realization came during a tense team meeting in 2003, when a veteran Raiders player rose from his seat to launch a verbal assault on head coach Bill Callahan. "It began as a discussion," Gannon recounted, "and it kind of escalated."

The meeting room fell silent. Gannon thought punches might be thrown.

And then Harbaugh got up.

"Now, keep in mind that Jim was the youngest person on the staff. You had people in that room with more than 30 years of coaching experience," the quarterback recalled. "But it was Jim who stood up and confronted the player.

"He said, 'You're wrong. And you don't talk to coaches like that. You need to sit down.'

"And Jim was right. The player was way out of line."

The player backed off. Order was restored. The meeting resumed. "I think the situation speaks a little to the staff we had at the time," Gannon said, "but it also spoke volumes about Jim Harbaugh."

Within a year, Harbaugh was the head coach at the University of San Diego, which led him to Stanford, which led him to Saturday night, when Harbaugh will lead the 49ers against the Raiders in an exhibition game at Candlestick Park.

The only surprise about Harbaugh's home debut as an NFL coach is the sideline he'll be roaming: Al Davis never wanted him to leave the Silver and Black.

Harbaugh this week recalled breaking the news to the Raiders owner in late 2003 that he planned on taking the head-coaching job at San Diego.

"He wanted me to stay," Harbaugh recalled this week. "At the time he thought I really wanted to be a pro coach."

Upon hearing Harbaugh's plans to head back to school, Davis advised him against leaving the NFL. Harbaugh respectfully pointed out to his employer -- whom he still calls "Mr. Davis" -- that he was emulating his career path. Davis worked his way up as a college coach.

"Yeah," Davis responded, "but that was at U-S-C, not U-S-D."

Harbaugh laughed as he recounted the story. He went to USD anyway, guiding the Toreros to a 29-6 record from 2004-2006 and then replicating that success at Stanford. But Harbaugh said this week that wherever he goes, he carries with him his two seasons' worth of lessons from Oakland.

The Raiders job was Harbaugh's first real coaching experience. While still playing in the NFL, he served as a "volunteer assistant coach" for his father, Jack Harbaugh, at Western Kentucky from 1994-2001, but that mainly involved helping his dad as a scout and recruiter and making the occasional game-day appearance. Harbaugh's gig with the Raiders, though, was the real deal -- hands-on grunt work complete with 20-hour workdays and a $50,000 salary.

Gannon said it was a tad awkward at first, considering that they both had broken into the league in 1987, "and here he was coaching me." But the awkwardness vanished when it became clear that Harbaugh wasn't just clinging to the NFL life -- he was embracing his next adventure.

"He had been a very good player, but he didn't assume anything. He knew that he was earning his stripes," Gannon recalled. "He didn't need the money. But I remember him dragging himself into the office, looking like he hadn't slept, after working till 3 a.m. the night before. That was the great thing about Jim -- he respected the profession."

Harbaugh made his assistant-coaching debut with a team that was loaded with offensive talent. Under offensive coordinator Marc Trestman, Gannon threw for 4,689 yards and 26 touchdowns, and receivers Jerry Rice, Tim Brown and Jerry Porter enjoyed big seasons.

Asked this week about what he learned from that Oakland experience, Harbaugh said: "How to coach."

"I'd never coached before full time. I learned how to be detailed. So many things," he continued. "(I sat) in on personnel meetings with the best -- Mr. Davis and Bill Callahan, a tremendous football coach. And I was exposed to great players like Rich Gannon. There were so many things, a thousand things really, that I learned over there."

The question now, of course, is whether Harbaugh can save the team on the other side of the bay. He inherits a 49ers team that hasn't reached the playoffs since the 2002 season. The former quarterback coach's biggest challenge is extracting a breakthrough performance from Alex Smith, the perennially disappointing former No. 1 pick.

Can Harbaugh fix him?

"I think he can," Gannon said. "Alex wants to be great. He wants to do the work. I'm not trying to make excuses for him, but if you look at what he's gone through -- all those coaches, all those coordinators, different systems -- that would have ruined Tom Brady and Peyton Manning and anybody ...

"There are enough good things I see in Alex Smith that I haven't given up on him yet."

Former Raiders backup quarterback Marques Tuiasosopo said Harbaugh had a knack for getting the most out of his quarterbacks, in part because there was no such thing as downtime. "He never let us rest a second," he said. After the final snap of practice, for example, Harbaugh might spring a pop quiz on his passers about short-yardage situations and goal-line plays.

And if they got one wrong?

"He'd just look at you and say, 'Come on, you can't play quarterback if you don't know these things,' " Tuiasosopo said.

Tuiasasopo, 32, is now a fledgling coach himself. He's in his first year as an offensive assistant at UCLA. Like Gannon, he's not surprised to see Harbaugh in charge of a Bay Area team -- albeit the one across the bridge from where his coaching career began.

"We would talk every now and then about his desire to be a head coach," Tuiasosopo said. "And there was just so much passion. I knew it was just a matter of time."

Contact Daniel Brown at dbrown@mercurynews.com