49ers QB Alex Smith left in the second quarter of the 49ers' 24-24 tie with St. Louis with a concussion. (AP Images)

The concussion San Francisco 49ers quarterback Alex Smith sustained in the second quarter of the team's 24-24 tie with St. Louis didn't come on the play originally assumed.

According to coach Jim Harbaugh, it happened on a quarterback sneak on fourth-and-short a few plays after Smith took a shot from Rams linebacker Jo-Lonn Dunbar.

Smith remained in the game for another six plays and was 3 of 3 for 36 yards, including a 14-yard touchdown to Michael Crabtree.

Just before the next 49ers drive was about to begin, Smith reported he had blurring vision and the coaching staff went to backup Colin Kaepernick. Shortly after meeting with team doctors, he was ruled out with a concussion.

Kaepernick started slow, completing only 2 of his first 7 attempts, but was 9 of 10 to finish the game. The lone incompletion came deep in Rams territory with about 15 seconds left in regulation, which preceded kicker David Akers' game-tying field goal.

"Kap did a very good job," Harbaugh said. "He came in, good focus, good demeanor, made plays, and I thought he handled himself pretty well."

Kaepernick talked briefly with Smith after the game.

"He seems all right," Kaepernick said. "Obviously, he's a little shaken up, but he seems OK."

If Kaepernick had gotten hurt, the 49ers' backup plan remains unclear. Center Jonathan Goodwin said he has not practiced snapping the ball to anyone other than the quarterbacks on the roster and didn't know what the team would have done should that have occurred.

Staley wasn't even aware the team only dressed two quarterbacks.

"Shoot, put me back there," he said. "I'll run it."

One option could have been Michael Crabtree, who played quarterback in high school before converting to wide receiver, but there is no obvious candidate. 

Smith was 7 of 8 for 72 yards before leaving. 

Follow 49ers reporter Kyle Bonagura on Twitter: @CBS49ers and @KyleBonagura.