Los Angeles Rams C Coleman Shelton (ankle), San Francisco 49ers LT Colton McKivitz (knee) ruled out

SANTA CLARA, Calif. -- The Los Angeles Rams continue to lose offensive linemen to injury after center Coleman Shelton was ruled out of Monday's 24-9 loss to the San Francisco 49ers with an ankle injury.

Shelton, who was the Rams' backup center, injured his knee on the first drive of the game, but came back out for the Rams' second offensive drive. He was later ruled out for the remainder of the game and replaced by Jeremiah Kolone.

The Rams are down to just two Week 1 starters on their offensive line after the injury. Shelton was playing in place of center Brian Allen, who injured his knee in the season opener. After the game, Rams head coach Sean McVay said he expected Allen to miss two to four weeks with the injury.

The Rams were also without guard David Edwards, who entered the concussion protocol on Saturday after telling the team that he "was a little bit foggy." The Rams have lost five offensive linemen to injury at some point this season.

Rams quarterback Matthew Stafford had been sacked twice for a loss of 19 yards when Shelton was ruled out.

The Rams weren't the only team forced to reach deep into its offensive line depth Monday night. Midway through the third quarter, Niners left tackle Colton McKivitz departed with a knee injury and a possible return was quickly ruled out.

The Niners fear McKivitz has an MCL injury and he will undergo more tests on Tuesday to determine the severity of the injury.

McKivitz started in place of injured star left tackle Trent Williams, who suffered a high right ankle sprain in last week's loss to the Denver Broncos. Williams is expected to miss four to six weeks but coach Kyle Shanahan said last week that Williams would not require surgery.

With McKivitz out, the Niners turned to Jaylon Moore to step in at left tackle. Moore, a fifth-round pick in 2021 out of Western Michigan, initially replaced Williams in Denver but was replaced by McKivitz for the final drives of that game.

The Niners also lost defensive end Arik Armstead to a foot injury in the second half.

ESPN's Nick Wagoner contributed to this story.