Larry Grant never stopped pursing and came up with the defensive play of the day when San Francisco needed it.
Grant tackled Seattle quarterback Tarvaris Jackson from behind, forcing a fumble that was recovered by Donte Whitner with 1:07 remaining, and the 49ers held on for a 19-17 win over the Seahawks on Saturday.
David Akers kicked four field goals for the 49ers, setting an NFL record with his 42nd of the season. He connected from 39 yards with 2:57 left to give San Francisco the lead.
The NFC West champions remained in position for the No. 2 seed in the playoffs and a first-round bye thanks to an impressive second-half effort on defense that was capped by Grant's hustle play.
The loss eliminated Seattle (7-8) from playoff contention.
Frank Gore had a 4-yard touchdown run on San Francisco's first drive of the second half.
Marshawn Lynch scored on a 4-yard run with 6:41 remaining to give Seattle a 17-16 lead. It was his 11th straight game with a score and the first touchdown rushing allowed by San Francisco (12-3) this season.
Lynch finished with 107 yards on 21 carries, the first back to run for 100 yards against the 49ers since Week 11 of the 2009 season.
San Francisco quarterback Alex Smith protected the ball as he has all season and his biggest throw set up Akers' decisive kick. On second-and-18 from his own 31, Smith threw deep for Michael Crabtree, who got just enough separation from Brandon Browner to haul in the 41-yard reception. The 49ers didn't advance any further, but were in range for Akers to give them the lead.
Smith finished 14 of 26 for 179 yards, while Crabtree had five catches for 85 yards. The bigger contributions came from Gore and his backup, Kendall Hunter. Gore finished with 83 yards rushing, while Hunter added 73 on just 12 carries.
The 49ers had 227 yards of offense in the second half and held Seattle to 72 yards. San Francisco coaches ran through the press box in the final seconds yelling, “Merry Christmas everybody!”
The 49ers could head into next week's regular-season finale at St. Louis with the No. 2 seed locked up if Atlanta wins at New Orleans on Monday night. They are still alive for the No. 1 seed, but would need Green Bay to lose its final two games.
But all San Francisco needs is a win over the lowly Rams to clinch a home playoff game and a weekend of rest.
Meanwhile, the Seahawks' three-game winning streak ended along with their playoff hopes. Seattle already needed an unlikely scenario to get to the postseason thanks to Detroit's win over San Diego on Saturday, but the loss to the 49ers dashed those hopes.
Seattle did make it interesting thanks to its special teams. Heath Farwell blocked Andy Lee's punt and the ball bounced inside the San Francisco 5 with less than 7 minutes remaining.
On the next play, Lynch scooted around the left edge and just inside the pylon, setting off a shower of Skittles flying out of the stands. The candy covered the blue-painted end zone to the point where workers with industrial blowers came out to try and clear the field. They were back minutes later with brooms and pans trying to clean up even more.
The 49ers were the first team in league history to go the first 14 games without allowing a touchdown rushing.
But Smith answered with his deep pass to Crabtree, and Seattle's final chance was thwarted by the only turnover of the game.
Lynch's 6-yard run to start the drive pushed him over the 100-yard mark, making him the first running back to top 100 yards against the 49ers since Ryan Grant did it for Green Bay in Week 11 of 2009. That snapped a streak of 36 straight games for the 49ers without allowing a 100-yard rusher.
Lynch then took a short pass from Jackson for 20 yards to the 45 at the 2-minute warning. Lynch added a 3-yard run and another swing pass to Lynch brought up third-and-3 at the San Francisco 48 with 1:18 left. Jackson was flushed from the pocket by Grant, who continued to pursue and grabbed Jackson from behind .The fumble bounced forward 10 yards, where Whitner fell on it as the San Francisco sideline burst into celebration.
Jackson finished 15 of 28 for 163 yards and a 13-yard TD pass to rookie Doug Baldwin in the first quarter.