LOS ANGELES — The Los Angeles Rams ran the ball on their first seven plays Sunday, marching straight through San Francisco’s defense for 65 yards and a touchdown.

“That definitely hits you on a personal level,” 49ers defensive tackle DeForest Buckner said. “I’m pretty sure a lot of guys took it personally.”

The Niners’ defense vowed to spend the rest of the game making up for that embarrassment. And with a fourth-down stop on the goal line several minutes later, San Francisco completely changed the direction of this NFC West rivalry.

Jimmy Garoppolo passed for 243 yards and ran for a touchdown, and San Francisco remained unbeaten with a dominant defensive performance in a 20-7 victory.

George Kittle had eight catches for 103 yards for the Niners (5-0), but their tenacious defense did most of the work. San Francisco held Los Angeles’ once-unstoppable offense to 157 yards in Coach Kyle Shanahan’s first victory over Rams Coach Sean McVay in a game in which both California rivals were playing their starters.

“L.A. has gotten after us a lot the last couple years, so it was a game for us to come out and just show that we are back and for real,” Niners defensive lineman Solomon Thomas said.

These rivals are going in opposite directions after this one-sided showdown. San Francisco stayed alongside New England as the NFL’s only unbeaten teams, while the Rams (3-3) are on their first three-game losing streak of McVay’s two-year tenure.

After enduring two miserable seasons while the Rams reached Super Bowl heights, the Niners were eager to reassert themselves.

San Francisco won a defense-dominated game by thoroughly throttling the defending NFC champions’ once-impressive passing game. Jared Goff went 13 of 24 for a career-low 78 yards while failing to get comfortable behind a porous offensive line, and the Rams didn’t manage a completion longer than 12 yards while going 0 of 9 on third down and 0 for 4 on fourth down.

“We were running the ball so well early, and we were trying to stick with that,” Goff said. “We just never really got in a rhythm. Their defense was able to settle in and that’s part of it.”

The game was still up for grabs when the Rams reached the San Francisco 1 on third down shortly before halftime, but the Niners then smothered two consecutive running plays up the middle.

“It sparks everybody,” Garoppolo said. “Coaches, players, everybody is hollering on the sideline.”

Tevin Coleman rushed for an early touchdown for San Francisco, while Garoppolo was mostly effective despite two turnovers.

The Niners didn’t score a touchdown in the final 27 minutes, but are off to their fourth 5-0 start in franchise history, and first since 1990.

Comments are not available on this story.