Joe Nedney kicked a 29 yard field goal with 9:38 left in overtime, as former Heisman Trophy winner Troy Smith threw for 356 yards to lead the San Francisco 49ers’ to a 23-20 win over the Rams.

Smith, making his second straight start used his elusiveness to create points late in the game. Smith threw a 16 yard touchdown pass to Michael Crabtree with 2:10 left in fourth quarter.

The Rams’ former Heisman winner Sam Bradford and Steven Jackson led the Rams back for Josh Brown’s 33-yard field goal on the final snap of regulation, but the Rams couldn’t get a first down after winning the overtime coin toss.

Smith drove the 49ers 55 yards, and got them into field goal range when safety O.J. Atogwe was called for a 22yard pass interference penalty after he avoided a sack.

The Rams led 17-10 in the fourth quarter, but allowed a Nedney 47 yard field goal. Then on three straight possessions, went three and out before San Fran took the lead just before the two minute warning. The Rams offense finished with four, three and outs, in their final five series of the game.

St. Louis has yet to win a road game this season.