Kelley L Cox-USA TODAY Sports

Christian McCaffrey rushed for 90 yards and two touchdowns, including the tying score during the San Francisco 49ers' comeback from a 17-point halftime deficit, as they defeated the Detroit Lions 34-31 for the NFC Championship on Sunday in Santa Clara, Calif.

The result sends San Francisco, the conference's top seed, to Las Vegas for Super Bowl LVIII on Feb. 11 against Kansas City, which won earlier Sunday 17-10 at Baltimore. It will be a rematch of Super Bowl LIV, which the Chiefs won 31-20.

The 49ers scored on their first five possessions of the second half, taking the lead for good when Jake Moody drilled a 33-yard field goal with 9:52 left to make it 27-24.

After Detroit eschewed a 48-yard field goal and failed on a fourth-and-3 gamble from the San Francisco 30, the 49ers clinched the win with Elijah Mitchell's 3-yard touchdown run with 3:02 left.

Jared Goff fired a 3-yard scoring strike to Jameson Williams with 56 seconds remaining, but a penalty on the onside kick sealed the outcome.

Brock Purdy completed 20 of 31 passes for 267 yards with a touchdown and an interception for San Francisco. Goff was 25 of 41 for 273 yards with a score for the Lions, who were aiming to make their first Super Bowl.

The 49ers' Brandon Aiyuk corralled an improbable 51-yard reception in the third quarter after Purdy's deep pass bounced off a Detroit defender's facemask. Aiyuk caught a 6-yard touchdown two plays later to cut the margin to 24-17.

Jahmyr Gibbs fumbled on Detroit's next play from scrimmage, and San Francisco tied the game on McCaffrey's 1-yard plunge.

Detroit wasted little time putting its stamp on the first half. The Lions led 7-0 less than two minutes into the game on a 42-yard touchdown run by Williams. Then they made the score 14-0 on a 1-yard run by David Montgomery at the 2:34 mark of the first quarter.

McCaffrey put San Francisco on the board with a 2-yard scoring jaunt 71 seconds into the second quarter. However, the Lions responded with Gibbs' 15-yard touchdown burst with 5:54 left in the half, five plays after Purdy tossed an ugly interception over the middle to Malcolm Rodriguez.

Detroit capped a near-flawless half with its fourth score in five possessions, a 21-yard field goal by Michael Badgley with seven seconds remaining that gave it a 24-7 lead at the break. That capped a 17-play, 68-yard drive.

More must-reads:

TODAY'S BEST
Pacers' Pascal Siakam leads team to Game 6 win vs. Knicks
Late goal sends Panthers to Eastern Conference Finals
Scottie Scheffler shoots improbable 66 after warming up for PGA Championship in a jail cell
Report: Tua Tagovailoa away from Dolphins amid contract chatter
Nuggets star has worrying comment about latest injury
Paul Skenes makes incredible Wrigley Field history in second-career MLB start
Giants rookie CF to undergo season-ending labrum surgery
Yankees' Juan Soto reacts to Hal Steinbrenner contract talk
Ex-teammate of Shohei Ohtani placed bets with same illegal bookmaker as interpreter 
Former Rams first-round pick retires from NFL after 11 seasons
Insider provides major injury update on Celtics' Kristaps Porzingis
Watch: Bruins strike first in Game 6 with incredible backhand goal
Dodgers make series of moves involving notable players
Hurricanes not expected to re-sign defenseman, center
Maple Leafs tab former Stanley Cup winner as new head coach
NFL insider expands on competition between Steelers QBs Russell Wilson, Justin Fields
NFL sets outrageous prices for Eagles-Packers Brazil game
Broncos 'very unlikely' to bring back former NFL interceptions leader
Greg Olsen offers broadcasting advice to Tom Brady
Mets star has theory about closer Edwin Diaz's recent struggles

Want more NFL news?

Join the hundreds of thousands of fans who start their day with Yardbarker's Morning Bark, the best newsletter in sports.