ST. LOUIS (AP) -- Typical for Steve Spagnuolo, the St. Louis Rams coach appeared to have no worries that it might have been his last day on the job.
Owner Stan Kroenke did not attend the finale of the St. Louis Rams' letdown season, a 34-27 loss to the NFC West champion San Francisco 49ers on Sunday. Spagnuolo, who's just 10-38 in three seasons, was proud of his team's late rally and referred to this year's 2-14 finish as a learning experience.
"We certainly think we should be better than 2-14. But I do think there was tremendous growth," Spagnuolo said. "You grow more in a situation like this than you do when it's all going easy, and you find out a lot about people in a situation like this.
"When you're going to build something, it's good to have the right people. We've got a lot of the right people."
Though the Rams bowed out with a seven-game losing streak, Spagnuolo frequently said the players' effort never faulted. Running back Steven Jackson had only positives.
"Outside of the wins-losses record that we've had, I think he's going to be successful and if he stays here, he'll be successful," Jackson said. "If he leaves, it's not a decision I make. I believe the front office will do what's best for the organization.
Jackson said there was no relief to be done.
"I'm never happy that the season is over," Jackson said. "The goal is and always will be the goal is to win a Super Bowl, so I hate once again the season is ending."
Record-setting kicker David Akers showed off a strong left arm to match his left leg as Michael Crabtree bamboozled defenders on a perfectly executed trick play for a touchdown that put the 49ers up by 17 late in the third quarter. It appeared to be the icing on a dominating performance that wrapped up the No. 2 playoff seed in the NFC and a first-round bye. Instead, it helped build just enough of a cushion against the usually offensive-challenged Rams.
Crabtree caught scoring passes from Akers and Alex Smith for the 49ers, whose 24-point fourth quarter lead was in jeopardy before they sealed the victory.
Akers broke the NFL single-season field goal record last week and finished with 44, including five in the first half of the two St. Louis meetings. He missed on a 48-yarder, but clicked from 36 and 42 yards.
Crabtree and Vernon Davis had big days for a team short of pass catchers and Tarell Brown had a pair of interceptions that led to touchdowns as the 49ers (13-3) beat the Rams (2-14) for the second time in five games. The 49ers held St. Louis to just 157 total yards in a 26-0 victory that clinched the NFC West in Week 12 but were hanging on at the finish of the rematch after the Rams scored two touchdowns in just 13 seconds.
Brandon Lloyd caught a 36-yard touchdown pass from Kellen Clemens, the Rams recovered Josh Brown's on-side kick and Cadillac Williams scored on a 1-yard run with 4:39 to go one play after drawing an interference call on Brown on an underthrown pass from Clemens in the end zone.
The Rams were rescued from the ignominy of landing the No. 1 draft pick for the second time in three years when the Colts (2-14) lost 19-13 to the Jaguars. The Colts hold the tiebreaker based on opponents' strength of schedule.
The 49ers' record under new coach Jim Harbaugh is their best since another 13-win season in 1997 under another rookie coach, Steve Mariucci.
The Rams scored 17 points in the fourth quarter, six better than their NFL-low game average, but were down to untested Tom Brandstater and third-and-17 after Clemens injured his right leg on a sack by NaVorro Bowman with 2:46 to go. Brandstater threw two incompletions, the 49ers took over at their own 40 and needed just one first down to seal it -- and exhale.
San Francisco seemingly had cemented the win in the final minute of the third quarter on Akers' first career touchdown pass for a 27-10 lead. The 49ers finished 6-2 on the road, the franchise's best showing since 1996.
Harbaugh is just the fourth rookie head coach to win 13 games and third by the 49ers, topped by George Seifert's 14-2 showing in 1989.
Clemens ran for an 18-yard score to give the Rams the early lead. Clemens made his third straight start in place with Sam Bradford (high left ankle sprain) and A.J. Feeley (broken right thumb) both sidelined. Bradford, the top pick in 2010, missed his fourth straight game and sixth overall.
Attendance was announced as 55,990, about 9,000 shy of capacity at the Edward Jones Dome, but the stadium appeared no better than half-full and drained quickly in the second half.
The 49ers won without injured wide receivers Ted Ginn Jr. (ankle) and Kyle Williams (concussion), and with Frank Gore mostly watching and gaining just 9 yards on seven carries. Crabtree had 92 yards on nine receptions and Davis had 118 yards on eight catches, his second 100-yard game of the year.
Jackson had 76 yards on 16 carries, a huge improvement over the first meeting against the 49ers in early December when he was held to 19 yards on 10 carries, before injuring his left biceps in the third quarter after dropping a low screen pass and then getting tackled hard by a pair of 49ers.
The 49ers began drives inside the St. Louis 35 on their first two touchdowns, and capitalized on Terrell Brown's interception of a flea flicker from running back Jerious Norwood to Clemens on the go-ahead score. Two plays after the pick, Crabtree slipped Josh Gordy's tackle on a sideline pattern and Quintin Mikell also missed on a 28-yarder that made it 14-7.
Clemens showed some nifty moves while dodging tackles on an 18-yard scramble for the Rams' first rushing touchdown in three weeks and the early lead, and Smith matched him on an 8-yarder in the final minute of the first quarter. Notes: Gary Pinkel, who coached the 49ers' Aldon Smith and the Rams' Danario Alexander at Missouri, was on the sideline before the game. ... The Rams cancelled the usual pregame pep rally and live music outside the stadium because of high gusting winds. ... 49ers FB Bruce Miller (left knee) was sidelined in the second quarter, but was in uniform testing it with sprints before halftime.