AP

Things got a bit hairy near the end, but the 49ers figured out a way to get past the Rams in St. Louis.

The Niners went up 34-13 with 6:30 to play in the game, but the Rams scored two quick touchdowns sandwiched around a successful onside kick to draw within a touchdown. The Rams then got the ball back with 3:37 to play and drove the ball into San Francisco territory before the drive fell apart when they lost Kellen Clemens to an injury. Clemens was sacked by NaVorro Bowman, knocking him out of the game and sending Tom Brandstater into the game. He threw two incompletions and the Niners were able to run out the clock.

With such a big lead and the first round bye in sight, it isn’t surprising that the 49ers might have been caught looking past the end of the game with the Rams. Defensive end Justin Smith and some other regulars were out of the game for long stretches in the fourth quarter, giving the impression that the Niners were already looking toward the playoffs.

Even if that’s what happened, give St. Louis credit for continuing to fight when they had little on the line. It remains to be seen if that effort will have an impact on owner Stan Kroenke’s decision about the future of coach Steve Spagnuolo, but he can feel a little pride that his team refused to quit on him.

The Niners now get a week off before finding out who they will meet in their first playoff game since 2002. The end might not have gone exactly as hoped, but 2011 was quite a debut for Jim Harbaugh.