SANTA CLARA, Calif. — The Seahawks knew they would have to play a basically blemish-free game to beat the 49ers in a wild-card playoff game Saturday.
And for almost three quarters, the Seahawks did.
Their offense had the top-ranked defense in the NFL on its heels, and the defense was doing just enough to keep Seattle in it, largely by holding the 49ers to field goals instead of touchdowns on three long drives.
But then came the one mistake the Seahawks knew they couldn't make, with Geno Smith fumbling the ball away on a strip sack by Charles Omenhiu on a third down at the 49ers' 30 with 2:25 to play in the third quarter, San Francisco ahead only 23-17.
The fumble came a play after Seattle initially appeared to have the ball at the 49ers' 7, on the brink of a touchdown that could put them back ahead.
Instead, a penalty on guard Damien Lewis for being illegally downfield moved Seattle back.
Then came Smith's fumble.
And then it was the 49ers who rumbled, marching 70 yards in seven plays to score on a seven-yard pass from rookie Brock Purdy to Eljah Mitchell to put the 49ers ahead 31-17.
On the next possession, two penalties killed Seattle's drive and forced a punt. The 49ers then scored quickly again on a 74-yard pass from Purdy to Deebo Samuel to make it 38-17 with 10:51 to play. On the next possession, Smith threw an interception.
And that was that on the game and the season, the 49ers pulling away for a 41-23 win in a game that somewhat mirrored the season itself — a promising start that engendered maybe even more optimism than the most optimistic fans had going into the year, followed by a staggering finish.
In their first season since 2011 without Russell Wilson or Bobby Wagner the Seahawks started 6-3.
But losses in five of their next six games forced Seattle to have to win its final two games just to sneak into the playoffs with the seventh seed at 9-8.
That had Seattle listed as a 9.5-point underdog going against a 49ers team that won its final 10 regular-season games, and had beaten the Seahawks by a combined 48-20 in two games, allowing just one offensive touchdown.
But there the Seahawks were, ready to take the lead with just over a quarter left before the sequence of Lewis' penalty and Smith's fumble opened the proverbial floodgates on a day when an expected rainstorm never really happened.
The 49ers scored 25 points in a span of 17 minutes and 19 seconds in the second half — getting one on a Purdy TD run and two others on Purdy TD passes — to put the game away.
The 49ers also outgained Seattle 256-156 in the second half and 505-332 for the game.
The playoff berth was the 10th in 13 seasons for Seattle under Carroll. But the Seahawks have not advanced past the divisional round since their last Super Bowl appearance following the 2014 season and have lost six of their last eight playoff games.
The 49ers scored the first two times they had the ball, and outgained Seattle 133-5, at which point the game seemed like the rout the oddsmakers expected.
After the 49ers opened with a field goal, a 68-yard run by Christian McCaffrey set up a Purdy three-yard pass to McCaffrey to make it 10-0 with 5:11 to go.
But the game quickly turned as Seattle scored touchdowns on two straight drives — a 7-yard TD run by Kenneth Walker III and then a 50-yard pass from Smith to DK Metcalf — to take a 14-13 lead.
Metcalf's score came on a third-and-3 at the 50. The 49ers brought a blitz but the Seahawks picked it up and Smith found Metcalf in man coverage on the left side against Charvarius Ward. Ward stumbled in pursuit, allowing Metcalf some space to get open, and Smith's pass hit him perfectly in stride. It was Metcalf's third touchdown reception of 50 yards or longer in the playoffs, tied for second-most in NFL history and behind only the four of former Pittsburgh Steeler John Stallworth.
It appeared as if the 49ers would have a 16-14 lead at the half when Robbie Gould nailed a 46-yard field goal with 13 seconds left.
But following a short kick, Smith ran for 9 yards and was hit late and at his head by 49ers safety Jimmie Ward, resulting putting the ball at the 38.
Jason Myers, named last month to the Pro Bowl, then hit a 56-yard field goal as time expired to put Seattle ahead 17-16 at the break.
The 49ers outgained Seattle 249-176 in the first half.
But Smith was 9-of-10 passing for 104 yards, and in contrast to the first two games between these teams in the regular season, Seattle's running game was also productive. Seattle had 82 yards on 20 carries in the first half, more yards and carries than the Seahawks had in either off the first two games.
Tempers flared early in the third quarter after Seattle safety Jonathan Abram pulled Samuel's leg after he was tackled to complete a 21-yard gain on a third-and-7 — which came after the late hit on Smith on the final drive of the second quarter.
As Samuel lay on the ground and pointed for a flag, players from both teams pushed and shoved and jawed some, though no real punches appeared to be thrown and no penalties were called.
Samuel's play took the ball to the Seattle 16 and five plays later the 49ers scored on a 1-yard run by Purdy to retake the lead at 23-17 with 7:15 to play in the third quarter.
That capped a 13-play, 75-yard drive on what was the opening possession of the second half.
Seattle responded by marching to the San Francisco 14. On a second-and-9, Smith hit Lockett for 7 yards. But the play was negated by the penalty on Lewis — Carroll argued the call vehemently to no avail.
The penalty turned what would have been third-and-2 at the 7 into second-and-14 at the 19.
After an incompletion on a pass to Metcalf down the sidelines at the end zone Smith dropped back and tried to move in the pocket to buy time.
But he couldn't escape Charles Omenihu, who stripped the ball as he tackled Smith.
The ball bounced sideways and Nick Bosa beat Seattle offensive linemen Charles Cross and Abraham Lucas for the recovery.
Seven plays later, the 49ers had a touchdown and a 14-point lead and control of the game they never relinquished.