SAN FRANCISCO -- Don't call him Captain Comeback just yet, but Alex Smith seems to have a knack for lifting the 49ers out of their doldrums at just the right time.
After the 49ers' defense held down the Arizona Cardinals for most of the clubs' opener Monday night, Smith and his teammates had one last shot at redemption for a terrible performance. Smith came through with the second big-time comeback victory of his short career, leading a sterling drive in the final three minutes to win 20-17.
"The biggest thing I took from this is character and maturity," Smith said. "We were struggling on offense but really hung in there and knew we were going to get it done. We believed in one another and marched down the field to get the win."
Smith first showed his comeback capability when he led the 49ers to three touchdowns in the fourth quarter of a surprising road victory over the Seattle Seahawks last December. His comeback against the Cardinals was confined to one drive, but the 12-play, 86-yard march was plenty impressive.
Never miss a local story.
Smith had a hand in the two biggest plays on the drive. He scrambled 25 yards on fourth and 1 before hitting Arnaz Battle across the middle on a pass that ended up at the Arizona 1-yard line. Battle scored on a 1-yard end-around with 22 seconds left to keep coach Mike Nolan unbeaten in three home openers at Candlestick Park.
San Francisco's offense didn't manage much before the final drive. Only one of the 49ers' first 11 drives went more than 21 yards, and they had three consecutive three-and-outs before the last drive.
Pro Bowl running back Frank Gore ran for 55 yards and a score but acknowledged a little rust after sitting out the preseason to heal his broken right hand.
"They came to stop the run, but we stayed together and got it done," Gore said.
The offense received credit for getting it done at the end, but the defense earned its share by keeping it close the entire game. Nolan had high praise for rookie defensive coordinator Greg Manusky.
After allowing an NFL-worst 412 points last season, San Francisco's six new defensive starters were tenacious while limiting the Cardinals to 261 yards and just one lengthy touchdown drive.
Arizona averaged 326 yards in its four consecutive victories over the 49ers in Nolan's first two seasons with the club.
"They did some great things against an explosive offense with some very good players," said Nolan, who allowed Manusky to call all the defensive formations. "You just have to be pleased."
Rookie linebacker Patrick Willis had an outstanding debut, making 11 official tackles, 15 by the 49ers' estimate. Willis forced a fumble and constantly seemed to be around the ball.
The 49ers' 3-4 defense could come to depend on a one-two punch from Willis and Derek Smith, who had eight tackles.
"I did pretty good out there," Willis said. "Those guys have a lot of good players, but we feel that we do, too, on our side of the ball. We can be really good as a unit and keep improving throughout the season."