The San Francisco 49ers needed a major rally to survive a scare from the Green Bay Packers, while the Detroit Lions pulled away late from the Tampa Bay Buccaneers in this past weekend's NFC Divisional Round games.

Now, the 49ers and Lions will square off in Santa Clara on Sunday with a ticket to Las Vegas on the line.

This is a matchup that has been percolating as a potential NFC title game throughout the season, and we have the number one and three seeds in the NFC going for it all.

But how could this game shake out, and what can we learn from both teams' recent games on this playoff run to inform us? Let's dive in.

NFC Championship Lions vs. 49ers: Detroit Lions

The Lions knocked off Matthew Stafford and the Rams in the Wild Card round, and did the same Sunday to the Tampa Bay Buccaneers.

The Bucs hung around for a while, but Detroit's superiority in the trenches combined with its array of weapons and some big, timely throws from Jared Goff earned the Lions a win.

Rookie running back Jahmyr Gibbs ran for a crucial touchdown to go ahead for good, and Goff hit Amon-Ra St. Brown for another score seven minutes later to give the Lions a two-touchdown lead.

The Buccaneers answered, but Detroit's defense came up with a big interception of Baker Mayfield to seal the game inside the two-minute warning.

NFC Championship Lions vs. 49ers: San Francisco 49ers

The 49ers got all they could handle and more on Saturday in a come-from-behind win over the upset-minded Green Bay Packers.

Hard rain made things tough on quarterback Brock Purdy, who struggled for much of the game before ultimately engineering a game-winning drive to send his team to the NFC Championship game for a second consecutive year.

Star running back Christian McCaffrey was a dominant force, as he ran for two touchdowns including the game-winner to go with 98 rushing yards.

The Niner defense struggled to contain Jordan Love and the Packers for most of the game, but held them to zero points in the all-important fourth quarter to do their part in the win.

The negative coming out of this one for San Francisco was the shoulder injury to Deebo Samuel that precluded his return to the game. His availability for this game is unclear.

NFC Championship Lions vs. 49ers: Preview

San Francisco will enter this game as a rightful favorite. Detroit's defense is a weak point that numerous opponents have been able to exploit to varying degrees of success in recent weeks, and the 49ers boast the most potent offense in the league with star tight end George Kittle and receiver Brandon Aiyuk joining Samuel and McCaffrey to compose a truly unimaginably strong stable of weapons.

Head coach Kyle Shanahan is an expert lever-puller and should have a good plan to attack Detroit's defense, and Purdy has proven fully capable of executing those plans and spreading the ball around to those weapons.

But the Lions are far from without hope in this matchup. The 49ers lost four games this regular season. One came in Week 18 to the Rams with most of the starters resting, and the other three all came in a row while Samuel was sidelined with an injury.

The 49ers are lethal with their full complement of weapons, but if one of them is out with an injury, like Samuel might be Sunday, they become much easier to defend.

Detroit's offense is a force to be reckoned with in its own right. A dominant offensive line affords Jared Goff the time to find weapons like St. Brown and breakout star rookie tight end Sam LaPorta. The line also makes Detroit's ground game with Gibbs and veteran David Montgomery tough to stop.

San Francisco's defense is far from a weak point, and the matchup between the 49ers edge rushers in Nick Bosa and Chase Young against that Detroit offensive front will be huge in determining how much of a chance the Lions have to pull the upset.