Deebo Samuel turned a short catch into an electric 57-yard touchdownTalanoa Hufanga returned an interception for a score and the 49ers beat the Rams 24-9 Monday night.

“We knew it would be an ice-bag game,” Hufanga said. “Every time we play these guys it’s a physical matchup. For us as a defense, we want to be the rock. We want to be solid on defense, stand our ground and go out there and swarm.”

Jeff Wilson Jr. also scored on a 32-yard run that gave the Niners (2-2) their seventh straight regular-season win over their in-state rivals.

The Rams (2-2) won the matchup that meant most in last season’s NFC championship game on the way to a Super Bowl title, but this meeting looked more like their recent regular-season meetings.

San Francisco used a relentless defense to slow down coach Sean McVay’s offense and got enough big plays for the win.

Nick Bosa had two of San Francisco’s seven sacks against Matthew Stafford to give him an NFL-best six on the season and Hufanga iced it with his 52-yard pick-6 in the fourth quarter. It was San Francisc