ST. LOUIS (AP) — The St. Louis Rams got off to a strong start against the San Francisco 49ers on Monday night, but it wasn't strong enough.

The Niners stormed back from an early 14-0 deficit and beat the Rams 31-17 in St. Louis as Colin Kaepernick passed for 343 yards and three touchdowns. Brandon Lloyd, Anquan Boldin and Michael Crabtree each caught a scoring pass for the 4-2 49ers, who have won three in a row.

Austin Davis tossed a 22-yard pass to Lance Kendricks to give the Rams a 14-point lead in the first quarter. But Ahmad Brooks and Dan Skuta had two sacks apiece for a defense that sacked Davis five times and permitted one first down on St. Louis' first six possessions of the second half. The defense also clinched the victory on Dontae Johnson's 20-yard interception return for a touchdown in the final minute.

The 1-4 Rams had just 158 total yards after going up 14-0.

More From 104.5 THE TEAM