SANTA CLARA, Calif. (AP) Carson Wentz did his job filling in for Matthew Stafford, and now Stafford gets the chance for a highly anticipated playoff matchup against his former team.

Wentz threw one of his two touchdown passes to record-setting Puka Nacua and ran for a score to lead the Los Angeles Rams to a 21-20 victory over the San Francisco 49ers on Sunday in a game filled with backups.

Los Angeles (10-7) clinched the sixth seed in the NFC and a trip to Detroit in the wild-card round next Sunday night, a game that will feature Stafford in the first playoff game hosted by Detroit in 30 years against the Lions team that drafted him first overall in 2009.

Stafford was dealt to Los Angeles before the 2021 season in a deal that sent Rams' former No. 1 overall pick Jared Goff to the Lions. The Rams went on to win the Super Bowl that season, while the Lions have turned into a winning team thanks in part to Goff.

“Exciting for this team just to get back to where we are right now, to be honest with you,” Stafford said. “The opportunity happens to be in Detroit, which is fun for me on a personal level.”

Wentz helped make it happen when he scored on a 12-yard run with 4:56 to play and then converted a 2-point conversion pass to Tutu Atwell to put the Rams ahead 21-20.

“It was a lot of fun,” said Wentz, who signed with the Rams in November and had handed the ball off on his only three snaps before Sunday. “It’s been over a year for me since I got game action and it’s been a weird obviously year and season for me. But I had a lot of fun out there. It was fun to get the win.”

The game had little meaning with the 49ers (12-5) having clinched the top seed in the NFC and a first-round bye and the Rams clinching a playoff spot last week.

That led both teams to sit several starters, including both quarterbacks, with Brock Purdy getting the day off for San Francisco.

“We both knew what this game was for both of us,” 49ers coach Kyle Shanahan said. “We both wanted to win but first thing was trying to keep our players safe.”

That provided an opportunity for former top-three picks Wentz and Sam Darnold to get their first starts of the season.

Darnold went 16 for 26 for 189 yards with a TD run and a TD pass to Ronnie Bell. He led the Niners to three TD drives in the first half before San Francisco's offense stalled without any starters.

“It was really good to just get out there and play an entire football game,” Darnold said. “Obviously the result wasn't what we wanted but it was good to get out there and get good quality reps.”

The biggest drama might have been Nacua's chase of the rookie records for catches and yards receiving. Nacua caught a 19-yard TD pass from Wentz in the first quarter to tie Bill Groman's record of 1,473 yards that had stood since 1960.

He then broke the mark with a 7-yard catch on the opening drive of the third quarter. Nacua stayed in the game for one more play and caught a 6-yard pass to give him 105 catches - one more than the record set by Miami's Jaylen Waddle in 2021.

Nacua's day was done and he went to the sideline to get a hug from his mother.

The Rams scored on a TD pass from Wentz to Tyler Johnson. Brett Maher missed the extra point as Los Angeles' kicking woes continued.

The Rams have missed a league-high 16 combined extra points and field goals this season. They waived Lucas Havrisik after he missed two extra points last week and brought back Maher, who missed six FGs and one PAT in seven games earlier this season. That didn't seem to help the cause.

San Francisco had its own kicking woes with rookie Jake Moody missing a 38-yard field goal for his first miss of any kind since Week 7. Moody then missed his first extra point after 60 straight makes late in the first half.

INJURIES

Rams: S Jordan Fuller (ankle) and LB Troy Reeder (knee) left the game in the first half and didn't return.

49ers: DE Clelin Ferrell left the game in the first quarter with a knee injury and didn't return. It is not believed to be a serious injury but Shanahan was unsure of whether he would miss any time. ... The Niners had several injured players inactive and also didn't play TE George Kittle (back spasms) and LB Dre Greenlaw (Achilles tendinitis) despite having them on the game-day roster.

UP NEXT

Rams: At Detroit on Sunday night, the fifth of six wild-card weekend games.

49ers: First-round bye and then a divisional-round game at home on Jan. 20 or 21.

---

AP NFL: https://apnews.com/hub/NFL

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.