SAN FRANCISCO — Not only is Alex Smith playing for a job next season, he might be helping coach Mike Singletary save his.
A switch of quarterbacks named Smith did wonders to keep San Francisco's hopes alive.
Alex Smith threw for 255 yards and three touchdowns in a triumphant return to the starting lineup following a five-game absence, and the 49ers improved their once-slim playoff chances with a 40-21 victory over the NFC West rival Seattle Seahawks on Sunday.
The Niners muddled up the ugly West race even more with a surprisingly lopsided win.
San Francisco (5-8) moved within a game of division leaders Seattle (6-7) and St. Louis (6-7), which lost 31-13 at New Orleans.
The 49ers looked much more like the team that was predicted to win the division after an unbeaten preseason — not the bunch that began 0-5.
"We're a young team and today was big for us," Singletary said. "But at the same time, today means nothing if we don't play well next week. We have very little room for error, and we have to understand that."
Matt Hasselbeck went 27 for 42 for 285 yards and two TDs, but threw four interceptions and lost a fumble as Seattle had turnovers in five of six possessions during one stretch.
"They didn't have to do anything special today because we gave them so many good shots and good opportunities," Seahawks coach Pete Carroll said.
Vernon Davis caught five passes for 70 yards and a 42-yard catch-and-run TD, Josh Morgan made a 15-yard touchdown reception and Brian Westbrook hauled in a 62-yard touchdown pass for his longest career TD catch and longest play from scrimmage since 2006. Westbrook wound up with six catches for 87 yards.
"It's playoff mode right now," Smith said. "It was a must-win game. We knew that all week — our backs against the wall."
Smith matched a career high by throwing for three touchdowns for the fifth time. The No. 1 overall draft pick in 2005 was back behind center in place of Troy Smith, who went 3-2 during his stint as San Francisco's starter.
Dashon Goldson made a 39-yard interception return for a touchdown on the third play of the second half.
This was a far cry from the rivals' matchup in Week 1, when the Seahawks won 30-6 and San Francisco failed to reach the end zone. Singletary thanked Carroll afterward for the whipping.
Jeff Reed kicked four field goals Sunday for the 49ers, who had already reached their season high in points by halftime with a 30-7 lead. It was the Niners' biggest first half since scoring 35 in a 35-16 home win over the Rams on Nov. 16, 2008.
Leon Washington returned a kickoff 92 yards for a touchdown late in the third quarter — the highlight of the day for the Seahawks, who lost for the fifth time in seven games after a 4-2 start.
"This one's pretty bad," Hasselbeck said. "It was not a good day for us. It was not a good day for me. It seems like everything was going wrong."
Deon Butler caught a late 2-yard touchdown and seriously injured his right leg. It appeared Butler broke his leg moments after he caught a 2-yard touchdown pass upon being hit by Phillip Adams. This is another tough blow for the Seahawks, who already were playing without top receivers Mike Williams and Ben Obomanu.
Medical personnel placed a vacuum splint on Butler's lower leg before taking him for an X-ray. He was quickly transported to Stanford Hospital, where he could spend several days.
San Francisco is trying to avoid missing the playoffs for the eighth straight season, but realizes it still has an uphill climb to get there.
- BYU center Tejan Koroma's penalty overturned,...
- Dick Harmon: Dick Harmon: Is BYU quarterback...
- The 2014 Heisman Trophy tracker: Week 3
- Red and Blue Recruits: Breaking down Utah and...
- Virginia gearing up for big road test at No....
- Heisman Trophy tracker: Week 3, injuries...
- Amy Donaldson: Domestic violence isn't a...
- If BYU and Utah played on the gridiron in...
- AAC commish: BYU is a 'power' team 133
- Roller-coaster ride: BYU outlasts... 103
- Pac-12 trips have made the Big House a... 102
- BYU moves up to No. 21 in AP poll, No.... 61
- BYU center Tejan Koroma's penalty... 58
- Vai's View: BYU's greatest quarterback... 51
- No. 21 BYU preparing for a Virginia... 49
- Dick Harmon: Dick Harmon: Is BYU... 49