The 49ers celebrated a victory that meant so much Sunday night in Seattle.

San Francisco did enough over the course of the game to escape with a 26-21 victory over the Seattle Seahawks to clinch the NFC West title and home-field advantage throughout the playoffs.

The 49ers also avoided the one key mistake to lose the game. That blunder, instead, belonged to the Seahawks.

Actually, it was more than just one mistake. But the delay-of-game penalty when Seattle had a first-and-goal situation at the 49ers’ 1-yard line in the closing seconds was the major late-game meltdown.

NBC Sports analyst Cris Collinsworth called it just minutes later on the broadcast, “One of the biggest mistakes of the entire season.”

Seahawks coach Pete Carroll, his staff and team absolutely, inexplicably blew it. A day later, Carroll tried to explain what happened.

The problem occurred when the Seahawks tried to substitute running back Marshawn Lynch into the game to take over at the goal line. Rookie running back Travis Homer had been the team’s back in their two-minute offense.

However, Lynch was shown a couple of times on the final drive on the sideline wearing a beanie. His helmet was not in his hands. He clearly was not expecting to enter the game at a moment’s notice just days after signing after a 14-month football layoff.

“Was Marshawn delayed a little bit? He was hesitant, but I didn’t see Homer at the time, but Marshawn was going on, he was supposed to go, and we just needed to get it done,” Carroll said Monday morning during an appearance of Seattle radio station KIRO-FM (H/T Seattle Times).

Seattle took over down by five points with 2:27 remaining in the fourth quarter. They had two timeouts. They used both of their timeouts when the clock was stopped.

The Seahawks called their timeout with the play clock running down with 46 seconds remaining. Then, they called another timeout four seconds later before their fourth-and-10 play from the 49ers’ 12.

After gaining a first down, the Seahawks let 15 seconds tick off the clock before getting everybody lined up in order to spike the ball with 22 seconds left. Seattle opted to kill the clock instead of calling for quarterback Russell Wilson to try to sneak it into the end zone on first down.

Then, things got really crazy.

As soon as the spike occurred, the 40-second play clock began.

Lynch was told to enter the game. But he did not appear to be immediately ready to leave the sideline and enter the huddle. With 21 seconds remaining on the play clock, the crowd and Collinsworth react -- "Here comes Lynch" -- when Lynch starts to jog out onto the field.

There was obvious confusion as Seattle offensive coordinator Brian Schottenheimer tried to get different personnel into the game. Wilson looked toward the sideline as he awaited the substitutions to match the play call.

Carroll said the spike on first down to stop the clock apparently gave his team a false sense of security.

“And sometimes what happens when you spike the ball and kill the clock, guys kind of sense like it’s a timeout and it’s not,” Carroll said Monday. “It’s just a regular sequence, so there was just a little bit of hesitation.

“By the time (Lynch) got out there, they called the play, we were late, and that’s it.”

In fact, at the time the play clock expired and referee Tony Corrente announced the delay penalty, the Seahawks’ offense was still in the huddle.

The infraction moved the ball back to the 5-yard line. Lynch left the game before he even got into the game. He returned to the Seattle sideline.

[RELATED: 49ers hope to have Dee Ford, Jaquiski Tartt for first NFL playoff game]

Wilson threw incomplete passes on second and third downs, including a play the Seahawks believed should have been pass interference on 49ers linebacker Fred Warner. Wilson completed his fourth-down pass to Jacob Hollister near the goal line.

But 49ers linebacker Dre Greenlaw made the Seahawks pay for their earlier mistakes when he tackled Hollister just short of the end zone to seal the 49ers’ victory.