ARLINGTON, Texas -- The 49ers are getting used to these kinds of games.
They did not exactly show a steady hand under the pressure, but the 49ers did enough to hold on for dear life on Sunday in the first round of the NFC playoffs.
Stay in the game with the latest updates on your beloved Bay Area and California sports teams! Sign up here for our All Access Daily newsletter.
The 49ers will be moving on with a 23-17 victory over the Dallas Cowboys on Sunday in front of more than 90,000 fans at AT&T Stadium.
The 49ers made one mistake after another after another in the fourth quarter to open the door for a Dallas comeback.
After a wild back-and-forth fourth quarter, the Cowboys had one last gasp to take the lead and were driving into 49ers territory with 14 seconds left when QB Dak Prescott decided to scramble to the 49ers' 24-yard line. However, time expired after the scramble and before the Cowboys could spike the ball, giving the 49ers the victory.
The 49ers played the second half without their best defensive player, as defensive end Nick Bosa was ruled out of the game with a concussion.
Bosa had three tackles and a half-sack in the first half before sustaining the head injury.
San Francisco 49ers
Find the latest San Francisco 49ers news, highlights, analysis and more with NBC Sports Bay Area and California.
And they came up with enough plays to overcome some issues with the 49ers offense.
The 49ers’ win means they will advance to the NFC divisional round to play at the Green Bay Packers, the No. 1 seed.
Here are three takeaways in the game:
The turning point
Both teams played mostly error-free into the third quarter, and the 49ers forced the first mistake.
Nickel back K’Waun Williams, in coverage against Cowboys receiver Cedrick Wilson, read Dak Prescott and walled off Wilson to make the interception at the Dallas 26-yard line.
It was the first turnover of the game, and it came after the Dallas offense was put in a second-and-23 situation after D.J. Jones dropped Prescott for a 13-yard sack.
The 49ers’ offense did not waste any time.
Deebo Samuel lined up in the backfield and took a pitch from Jimmy Garoppolo. Samuel showed patience and he worked around the right side, then he saw an opening, cut back and hit the accelerator.
Samuel scored on a 26-yard run to give the 49ers a 23-7 lead midway through the third quarter.
Samuel’s incredible roll as a multi-faceted offensive weapon continued. On the day, he gained 63 yards rushing on nine attempts, while catching three passes for 38 yards.
However, they would not keep that momentum for long.
Garoppolo vs. Prescott
After playing error-free football well into the third quarter, 49ers quarterback Jimmy Garoppolo made a couple of critical errors to enable the Cowboys to get right back in it.
The first one Garoppolo wants back was in the third quarter when he overthrew Aiyuk, who had gained huge separation against Cowboys cornerback Trevon Diggs. The third-down play would have gone for big yardage. Instead, it led to a punt.
After the Cowboys pulled to within 13 points, 23-10, Garoppolo made a critical mistake when he overthrew receiver Trent Sherfield. Dallas defensive back Anthony Brown made the interception and returned it 23 yards to the 49ers’ 28.
The Cowboys cashed it in, as Prescott scored on a 5-yard scramble to cut the 49ers’ lead to six points, 23-17, with 8:02 remaining.
Garoppolo’s right thumb was not a huge issue leading into the 49ers’ first-round playoff game, so there is not reason to make that excuse now. He completed 16 of 25 pass attempts for 172 yards with no touchdowns and one interception.
The thumb did not seem to be an issue at all in the first half. Garoppolo played an error-free first half, as the 49ers took a nine-point lead.
Garoppolo completed 11 of 14 pass attempts for 133 yards in the first half.
The 49ers were efficient on third downs, as they converted four of their seven opportunities (57 percent).
Wide receiver Brandon Aiyuk was Garoppolo’s top target, as he was able to beat man coverage to gather in four catches for 67 yards.
Prescott had a little more difficulty against the 49ers’ pass defense, as he completed nine of his 16 pass attempts for 89 yards. He hit Amari Cooper on a 20-yard touchdown pass against Williams’ coverage.
Playing from ahead
A week earlier, the 49ers seemed to fall hopelessly behind in the first half. They opted not to press their luck two games in a row.
The 49ers came out and with a seven-play 75-yard drive that running back Elijah Mitchell capped with a 4-yard touchdown run.
After a quick three-and-out, with Nick Bosa registering a third-down sack, the 49ers extended their lead on Robbie Gould’s 53-yard field. Those points were made possible when fullback Kyle Juszczyk fought for 10 tough yards on a third-and-21 pass from Jimmy Garoppolo.
The 49ers built their lead to 13-0 on another Gould field goal before the Cowboys got their top-ranked offense going with a touchdown drive to cut the deficit to 13-7 with five minutes remaining in the first half.
Gould bumped the 49ers’ lead to nine points, 16-7, with a 52-yard field goal.
The Cowboys were unable to add any more points before the end of the half when Wilson appeared to lose Prescott’s third-down pass in the sun. The Cowboys would have been in field-goal range if the pass had been completed.
Because the 49ers were playing from ahead most of the game, Mitchell got a lot of chances. Mitchell gained 96 yards and a touchdown on 27 rushing attempts.
The 49ers improved their record to 23-1 in games in which they ran the ball 30 times or more since 2019.