With the victory over their divisional rivals, the Rams (7-8) now only need to beat Seattle in the two teams' season finale next week to take their first division crown since 2004.
The 49ers (5-10), meanwhile, saw their slim playoff hopes evaporate with the setback.
Troy Smith threw for 153 yards and was intercepted once. He hooked up with Michael Crabtree on a 60-yard touchdown pass but was benched early in the fourth quarter.
Beautician charged with giving client fatal silicone butt injection
Astronomers offer more expansive view of universe