(Reuters) - Colin Kaepernick sparked San Francisco with an 80-yard touchdown bomb as the 49ers overcame a slow start to beat the St. Louis Rams 31-17 on Monday.
San Francisco trailed 14-3 with just seconds left before halftime when Kaepernick rocketed a long strike to Brandon Lloyd for a game-changing score.
The 49ers tallied 24 straight points to take control, then finished off the Rams in the final minute where Dontae Johnson returned an interception 20 yards for a score as St. Louis was trying to put together a tying drive.
It was the third straight win for San Francisco (4-2), putting them a half-game ahead of Seattle and behind leading Arizona in the NFC West. Kaepernick took the lead role with 343 yards passing and three touchdown throws. He added 37 yards rushing.
St. Louis (1-4) lost their third straight despite coming out strong with an 80-yard drive that ended with Benjamin Cunningham scoring a TD from one yard out.
St. Louis QB Austin Davis then hit Lance Kendricks on a 22-yard TD that gave the Rams a 14-0 edge after the first quarter.
(Writing by Jahmal Corner; Editing by Ian Ransom)