Isaac Bruce reached a pair of milestones in a late-game flurry in his old stadium.
Both helped the San Francisco 49ers in an improbable comeback.
Bruce became the fifth player to reach 1,000 catches on a 3-yard touchdown grab with 4:12 to go and passed Tim Brown for second on the career receiving yards list on the 49ers' go-ahead drive in a 17-16 victory over the St. Louis Rams on Sunday.
The Rams (2-13) squandered a 10-point lead for the second straight week, failing to capitalize on four turnovers and four sacks while losing their ninth in a row.
Josh Morgan got the go-ahead score on a 48-yard reception with 1:22 to go from Shaun Hill, who struggled with three interceptions before putting it all together late.
Morgan and Jason Hill both appeared to run the same pattern in the left corner of the end zone, and three Rams were also close by when Morgan caught a slightly underthrown ball for only his 18th catch of the season.
The 49ers (6-9) forced only one turnover, but it was the clincher and gave them four victories in five games heading into next week's finale at home against the Redskins.
The Rams got to their 48 in the final minute before Tarell Brown intercepted an off-target pass from Marc Bulger with 16 seconds to go.
Bruce needed six catches for 1,000 and 60 yards to pass Brown and he hit the first milestone with five catches for 32 yards on the TD that cut the deficit to 16-10 with 4:12 to go.
After the Rams went three-and-out, he added an 8-yard grab to pass Brown two plays before Morgan's go-ahead TD.
The 15-year veteran played his first 14 seasons with the Rams, and fans crooned "BRUUCE!" in appreciation after he beat Fakhir Brown for the touchdown. Other players to reach 1,000 receptions are: Jerry Rice (1,549), Cris Carter (1,101), Marvin Harrison (1,095) and Brown (1,094).
Ron Bartell had two interceptions and Oshiomoghe Atogwe added his team-leading fifth of the season along with a forced fumble and fumble recovery for the Rams.
Steven Jackson rushed for 100 yards for the first time since Game 6 despite spending time on the training table with a sore left hamstring and rookie Keenan Burton's first career touchdown reception came in a 10-point flurry in the final 1:12 of the half of the home finale.
The game was blacked out on local TV for the second straight week and played in a quiet stadium that appeared to be about two-thirds full for a matchup of teams that replaced coaches during the season.
Just like last week, the Rams had a 10-point halftime cushion that did not stand up.
The 49ers had three turnovers by halftime, matching their total from the previous three games. Hill, who was 8-for-21 for 89 yards, had entered the game with 10 TD passes and only four interceptions.