Jayne Kamin-Oncea-USA TODAY Sports

Christian McCaffrey rushed for 116 yards on 20 carries and scored a touchdown to lead the San Francisco 49ers to a 30-23 win against the Los Angeles Rams on Sunday afternoon at Inglewood, Calif.

San Francisco quarterback Brock Purdy completed 17 of 25 passes for 206 yards for the 49ers (2-0). He had no interceptions for the second consecutive game.

The San Francisco defense kept the Rams (1-1) out of the end zone and forced two turnovers in the second half.

Rams rookie wide receiver Puka Nacua set a team rookie record by catching 15 passes for 147 yards. He also set an NFL record with 25 receptions through his first two games.

Rams quarterback Matt Stafford completed 34 of 55 passes for 307 yards with a touchdown and two second-half interceptions.

With the score tied at 17-17, a tipped pass landed in the hands of San Francisco cornerback Isaiah Oliver for Stafford's first interception in his past 164 attempts.

The 49ers converted the turnover into a 57-yard field goal by Jake Moody for a 20-17 lead with 1:21 left in the third quarter.

Purdy's 31-yard strike down the sideline to Jauan Jennings led to an 11-yard touchdown run by Deebo Samuel that stretched the lead to 27-17 with 11:28 left in the game.

The Rams scored their first points of the second half on a 48-yard field goal by Brett Maher with 7:13 remaining to cut the lead to 27-20.

The Rams got the ball back with 5:29 left, but Stafford was intercepted by Deommodore Lenoir and he returned the ball to the Rams 15 with 4:48 remaining, setting up a 26-yard field goal by Jake Moody for a 30-20 lead with 2:59 left.

Maher kicked a 38-yard field goal as time expired for the 30-23 finale and the 12th straight regular season win by the 49ers over the Rams.

McCaffrey scored on a 14-yard touchdown run on the opening drive of the game for a 7-0 lead.

The Rams answered with a 43-yard field goal by Maher to make it 7-3 with 1:54 left in the opening quarter.

McCaffrey's 51-yard run down the sideline set up a 27-yard field goal from Moody to extend the lead to 10-3 with 13:32 left in the first half.

The Rams evened the score at 10 on a 6-yard touchdown pass from Stafford to running back Kyren Williams with 9:49 left in the half.

Williams scored again on a 4-yard run with 1:45 to go in the half to give Los Angeles its first lead at 17-10.

Purdy dove across the goal line on a 1-yard run on the final play of the half to tie the score 17-17.

More must-reads:

TODAY'S BEST
Panthers claw way to 2-0 Stanley Cup Final lead with win over Oilers
Dan Hurley's decision gives UConn another win, lets fans exhale
USMNT coach Gregg Berhalter under fire as Copa America draws near
Four hot issues ahead of Paris Olympics
Kyrie Irving is letting Luka Doncic down in NBA Finals
Forecasting a potentially surprising cut for every AFC team
Forecasting a potentially surprising cut for every NFC team
Five underrated MLB trade chips contenders should consider targeting
Jordan Love believes Packers 'don't have to have a No. 1 receiver'
Week 16 NASCAR power rankings: Kyle Larson reclaims frontrunner status with Sonoma win
U.S. Open: Five players you should have your eye on at Pinehurst
Stars' Jim Nill wins NHL GM of the Year award for second straight season
Pirates release veteran right-hander
Steelers sign second-round OL, complete rookie signings
Hurricanes reportedly looking to fill vacant GM role internally
WNBA experienced viewership and attendance surge in May
MLB players name the ‘most overrated player’ in the league
White Sox catcher undergoes season-ending surgery
Report: Lakers HC job viewed negatively within NBA
One player makes bizarre choice for 'most overrated' colleague