In the second quarter, McCaffrey threw a 34-yard touchdown pass to wide receiver Brandon Aiyuk to tie the game 7-7. In the third quarter, the running back hauled in a nine-yard touchdown pass from quarterback Jimmy Garoppolo to give the Niners a 17-14. He ran the football into the end zone in the fourth quarter for a one-yard score, giving San Francisco a 24-14 lead.
A 49ers win would be the team's eighth consecutive regular-season victory against the Rams.
Here is McCaffrey's one-yard touchdown run in the fourth quarter.
You can watch McCaffrey's touchdown reception in the third quarter below.
You can watch McCaffrey's touchdown pass in the second quarter below.