Los Angeles Rams running back Todd Gurley is brought down by San Francisco 49ers inside linebacker Gerald Hodges in the 4th quarter. The San Francisco 49ers defeated the Los Angeles Rams, 22-21, at the Los Angeles Memorial Coliseum in Los Angeles, CA. on Dec. 24, 2016. (Photo by John McCoy/SCNG)

LOS ANGELES >> No NFL team this season had been worse against the run than the San Francisco 49ers. By most measures, no team had even come close to matching their ineptitude in stopping opposing ground games.

Before Sunday, their opponents had averaged five yards per carry — making San Francisco the only team in the past three seasons to yield a rate so high. To find a team that had allowed as many touchdowns on the ground (23) as the 49ers have this season, you’d have to go back even further — a half-decade, to be exact.

So it would seem like a dream scenario that the Rams would find themselves up by a touchdown, with five minutes remaining and a talented young running back in their backfield, only a few strong rushes away from running out the clock and snapping a five-game losing streak.

But as has been the case with the Rams’ run game all season, even a task as simple as that was too much to ask in a painful, 22-21 defeat.

Todd Gurley took a carry up the middle for one yard. He took another carry up the middle for four more. The next play, quarterback Jared Goff was sacked, and the Rams punted. From there, everything fell apart. The 49ers milked the clock on a game-winning touchdown march, doing the one thing the Rams couldn’t all day: Sustain a single drive.

It was a familiar ending to an all-too-familiar story.

After scoring two first-quarter touchdowns, the Rams didn’t have a single drive longer than 19 yards the rest of the game. Going against the NFL’s worst run defense — a unit that allowed 12 opposing rushers in its last 14 games to rush for 100 yards — that was unacceptable.

All season long, the Rams have struggled mightily to establish any semblance of a consistent rushing attack. Even against the worst unit the NFL could possibly offer, the Rams only mustered 99 total rush yards — 30 of which came on a jet sweep touchdown run from Tavon Austin. The team’s other 28 carries averaged just 2.46 yards.

“You see any good team in the league, any good offense in the league, they’re probably running the ball pretty well,” Goff said. “That’ll set up the pass, set up other runs, set up screens, stuff like that. When we get (Gurley) going, it obviously helps.”

Early in Sunday’s loss, Gurley seemed poised to help in a big way. His first six carries went for 24 yards, as the Rams continued to feed him. Still without a 100-yard game this season, the stars finally seemed aligned for the maligned young running back.

But like clockwork, the run game grinded to a halt. Gurley carried the ball four times for just nine yards in the second quarter. The Rams’ offense attempted to adjust, but the problems only worsened.

“We changed a little bit of our run calls,” offensive tackle Rodger Saffold said. “When we were running downfield right at them, we were doing pretty good. Then, just small mistakes here and there.”

But those small mistakes continue to suggest a much bigger problem. The only NFL team with fewer yards on the ground this season is Minnesota, which lost Adrian Peterson to a season-ending injury in Week 1. The Rams, meanwhile, have had their Pro Bowl running back all season.

Last season, Gurley averaged 85 yards per game — a total he has matched just one time this season. With the Cardinals and their top-ranked run defense coming to town next weekend, Gurley’s hopes of reaching the century mark just once this season is in serious doubt.

Still, the running back seemed unfazed. From his locker, Gurley, who finished with 67 yards on 23 carries, characterized the Rams’ efforts on the ground as “pretty good.” His coach disagreed.

“Todd made a big emphasis on running the football, and I think he averaged 2.9 a carry,” interim coach John Fassel said. “That’s just not good enough.”

Ryan Kartje is a sports features reporter, with a special focus on the NFL and college sports. He has worked for the Orange County Register since 2012, when he was hired as UCLA beat writer. His enterprise work on the rise and fall of the daily fantasy sports industry (http://www.ocregister.com/articles/industry-689093-fantasy-daily.html) was honored in 2015 with an Associated Press Sports Editors’ enterprise award in the highest circulation category. His writing has also been honored by the Football Writers Association of America and the U.S. Basketball Writers Association. A graduate of the University of Michigan, Ryan worked for the Bloomington (Ind.) Herald-Times and Fox Sports Wisconsin, before moving out west to live by the beach and eat copious amounts of burritos.