SANTA CLARA, Calif. (AP)The Los Angeles Rams efficiently moved the ball down the field on the opening drive before a sack stalled them and led to a field goal.

That set the tone for the night for the Rams, who struggled to move the ball consistently and failed to finish off the few drives when they did.

It all added up to a 24-9 loss to the San Francisco 49ers on Monday night in one of the worst offensive performances in six years under coach Sean McVay.

”The story of the night from an offensive perceptive was self-inflicted wounds,” McVay said. ”Just above the neck errors where we’re not doing the things that we are capable of and I expect us to be better than that.”

The Rams (2-2) were held to 257 yards and three field goals, marking the fifth time they failed to score a touchdown in any game under McVay in the regular season or playoffs. It marked their seventh straight regular-season loss to the Niners (2-2), although they did win the most important matchup in last season’s NFC championship game on the way to a Super Bowl title.

It was a far different result this time.

Matthew Stafford was sacked seven times, committed two turnovers, including a back-breaking pick-6 and the Rams were held to 3.52 yards per play in the third-worst output of the McVay era.

”It’s execution on our part,” Stafford said. ”There were plays where we can execute better. Whether it’s throwing and catching or just assignment wise. A lot to clean up.”

Stafford started off well, completing his first seven passes of the game to get into the red zone before a sack by Samson Ebukam sent the Rams backward for a field goal.

Two more trips to the red zone stalled near the goal line and ended with field goals, and those were the productive drives.

The other seven possessions featured three three-and-outs, two fourth-quarter turnovers, another drive that netted no yards before a punt and a give-up possession to run out the clock at the end of the game.

The Rams managed just 57 yards on the ground and Stafford produced only 254 yards on his 32 completions, with his 7.9 yards per completion, his lowest total since 2018.

”Without a doubt it’s fixable,” said receiver Cooper Kupp, who had 14 catches for 122 yards. ”These kind of games hurt. It’s a gut punch to walk off the field and don’t accomplish what you have worked so hard to accomplish.”

Despite the struggles to move the ball, the Rams still had a chance when they moved the ball into Niners territory midway through the fourth quarter trailing 17-9.

McVay called for a screen to Kupp and the Niners read it perfectly. Safety Talanoa Hufanga came off his man and intercepted the pass, racing 52 yards for the game-sealing touchdown.

”They were in man coverage,” McVay said. ”It’s not a play you like versus that look. It was like deja vu. Same thing happened with Jimmie Ward last year in that same spot.”

This marked the fourth time in the past six regular-season meetings that the Niners had a pick-6 against Los Angeles, with three of the scores coming in the same end zone at Levi’s Stadium.

Fred Warner had one in 2019 and Ward did it last season. Javon Kinlaw had the fourth in Los Angeles in 2020.

More AP NFL coverage: and