Vernon Davis tied the NFL record for touchdown receptions for a tight end with his 13th of the season, helping the San Francisco 49ers finish strong and the lowly St. Louis Rams clinch the No. 1 overall draft pick in a 28-6 victory on Sunday.
Frank Gore added 107 yards rushing on 23 carries and two late TDs for the 49ers (8-8), who pulled away after a desultory first half in which they mustered only 52 yards and trailed 3-0.
San Francisco ended a string of six consecutive losing seasons and ended a six-game road losing streak while the Rams (1-15) wrapped up their first winless home schedule since going 0-6 in 1959 and only the third in franchise history.
The Rams needed a loss in the finale to secure the No. 1 pick for the first time since 1997, when they traded up to get seven-time Pro Bowl tackle Orlando Pace. Their puny offense filled the bill with a season-worst 109 yards total offense, including only 22 yards in the second half.
It's the first No. 1 overall pick they earned since taking Oregon State quarterback Terry Baker, the Heisman Trophy winner the previous season in 1963.
The 49ers held an opponent to 10 or fewer points for the seventh time behind a season-high eight sacks including 3 1/2 by Justin Smith, who entered the game with 2 1/2 sacks.
Rams rookie quarterback Keith Null absorbed five of the sacks and was replaced by Kyle Boller midway through the third quarter.
The team announced that Null, who was 7 for 17 for 57 yards, had been shaken up.
Davis tied the mark set by Antonio Gates last season with the longest catch of his career, getting behind the defense on a 73-yard reception from Alex Smith that put the 49ers ahead 14-6 midway through the fourth quarter.
Gore had four 100-yard games in the last five games, and five overall.
For much of the game, the punters dominated. The Rams' Donnie Jones punted a season-high 11 times for a 50.1-yard average while Andy Lee tied his season high with nine punts for a 46.7-yard average.
The Rams were blacked out on local television for the third straight game and attendance at those games are the three lowest since the franchise relocated to the Midwest in 1995.
Paid attendance of 47,965 was the best of the three, likely boosted on "fan appreciation day" that featured multiple giveaways of flat-screen TVs, game-worn jerseys and Super Bowl tickets along with greatly reduced prices for concessions and team store merchandise.
Josh Brown's 54-yard field goal in the second quarter, a yard off his season best, was the only scoring in the first half. Brown was wide left on a 45-yard attempt to end the half after the Rams declined to use any of their timeouts.
The Rams ran out of offensive guards when rookie Roger Allen III, making his first career start after being undrafted out of Division II Missouri Western, injured his left knee in the second quarter. The flip card listed Mark Setterstrom, out for the season with a left triceps injury that will require surgery, as the backup at two positions, while starting tackle Adam Goldberg was listed as the backup at two positions.