ST. LOUIS -- It took a crucial stop by the Rams' beleaguered defense and Marc Bulger being nearly perfect on the winning drive to halt St. Louis' five-game losing streak.
The Rams (5-6) broke another team's heart for a change on Bulger's 5-yard touchdown pass to Kevin Curtis with 27 seconds to go for a 20-17 victory over the San Francisco 49ers on Sunday. Twice during the skid they lost in the final minute.
"We needed to win in the worst way," Curtis said. "To come out of there and score when we need to gives us a lot of hope for the rest of the season."
San Francisco (5-6) totaled 171 yards rushing against the NFL's worst defense against the run, including 134 yards on 21 carries by Frank Gore. He's the fifth player in six weeks to top 100 against the Rams, and totaled 261 yards in two games against St. Louis.
Leading 14-13 midway through the fourth quarter, the 49ers marched down the field on a 13-play, 75-yard drive that chewed up more than 7 1-2 minutes and included only one pass. The drive screeched to a halt at the 7 when Michael Robinson was stopped for no gain on third-and-1 by Brandon Chillar and Raonall Smith, forcing a 24-yard field goal by Joe Nedney with 3:54 to go.
"That was a big moment," Rams middle linebacker Will Witherspoon said. "That was a game-changing moment."
Gore was not in the game for the big carry after rolling his right ankle four plays earlier, an injury coach Mike Nolan described as a bruise. He was taken for X-rays after the game and again before the 49ers left town.
Before leaving for the second set of X-rays, Gore said Robinson, the 49ers' short-yardage back, would have gotten the third-down call in any case.
"I would have played it, but Mike does the short yardage," Gore said.
Nolan wouldn't second-guess his decision not to go for the first down.
"I thought about it at the time, running it hard, but we're on the road," Nolan said. "Make it a touchdown game. I wouldn't change anything."
Stymied much of the game, Bulger was 9-for-9 for 66 yards during a 12-play, 80-yard drive for the winning score. He finished 23-for-34 for 201 yards with one touchdown and one interception.
Bulger was sacked twice, a big improvement after absorbing 11 sacks the previous two weeks. The Rams have a makeshift line featuring three replacements.
"He's a little sore from the last couple of weeks," guard Adam Timmerman said. "You've just got to keep him clean. That gives him more confidence to sit back there and make the throws."
The 49ers missed a chance to keep pressure on first-place Seattle in the NFC West. San Francisco had won three straight.
"This is a game we felt that we should have won," defensive end Bryant Young said. "But when you allow teams to stick around, they're not going to lay down."
Both of St. Louis' last-minute losses during the slump came against Seattle. This time, safety Oshiomogo Atogwe intercepted a desperation pass by Alex Smith and ran out the clock.
Gore, who has four 100-yard games in the last five weeks, had 40 yards on five carries in the 49ers' final drive. He also produced the 49ers' lone highlight of the first half, a 12-yard scoring run in which he powered through Atogwe at the 2.
Steven Jackson was just as impressive for the Rams, who returned to basics after a 15-0 loss to the Panthers when they called 41 pass plays and only eight runs.
Jackson, limited to 27 yards, had 121 yards on 23 carries, with a 36-yard scoring run in the first half. He had two carries for 10 yards and four catches for 25 yards on the winning drive to help the Rams beat a resurgent San Francisco defense that had allowed only 30 points in the last 3 1/2 games.
Curtis had three catches for 41 yards, but made big plays at the finish of each half. He found a seam in the 49ers' zone for the winner, and his 27-yard reception set up Jeff Wilkins' 51-yard field goal on the final play of the first half that put the Rams ahead 13-7.
Curtis fell down after catching a low throw from Gus Frerotte, who came in after Bulger got the wind knocked out of him on a hit by Young. But Curtis was untouched, got up and ran for several more yards before going out of bounds.
The losing streak was the Rams' longest since an eight-game skid in 1997. They also snapped a three-game losing streak against the 49ers.
- Torry Holt was held to four catches for 30 yards for the Rams, but passed Jerry Rice for the most yards receiving in the first eight seasons. Holt has 10,282 yards, 9 more than Rice.
- Tye Hill intercepted his third pass, tied for the NFL rookie lead, for St. Louis, but left in the second half with a quadriceps injury.
- Antonio Bryant, whose status was not affected by an arrest on charges of reckless and drunken driving last week, had two catches for 53 yards. They came on consecutive plays on the 49ers' lone scoring drive of the first half.