SANTA CLARA, Calif. -- Brock Purdy rolled to his left and saw his first few options covered. At the last second, George Kittle broke free running deep, Purdy threw across his body and Kittle made a juggling catch that sparked San Francisco's only touchdown drive.
That one big play proved to be enough to send the 49ers to their second consecutive NFC title game, thanks to a suffocating defensive performance.
Christian McCaffrey capped that drive with a go-ahead 2-yard run and the defense buckled down from there, sealing a 19-12 victory over the Dallas Cowboys on Sunday.
"Man, we're just excited that we won," said Purdy, the 49ers' unbeaten rookie quarterback. "Everyone did their part. It's playoff football, it's never easy, but we're moving on."
The 49ers used back-to-back long scoring drives in the second half to wear down the Cowboys and win their 12th consecutive game. San Francisco advanced to play the Eagles in the NFC title game Sunday in Philadelphia after losing in that round to the Rams a year ago.
The Cowboys lost for the record seventh consecutive time in the divisional round and have failed to make it to the NFC title game since winning their fifth Super Bowl title following the 1995 season.
Dak Prescott threw two interceptions and Brett Maher missed his fifth extra point of the postseason when his attempt was blocked. He later made two field goals.
"Just disappointment," Prescott said. "Defense gave us an opportunity to win this game. They played hard against a really, really good offense, a really good team. For us to only put up the points that we did, that's unacceptable. It starts with me. I've got to be better. There's no other way to sugarcoat it."
The key play came on the second play of the drive late in the third quarter with the game tied at 9. Purdy ran a bootleg that Dallas covered perfectly.
But he waited long enough for Kittle to improvise and turn upfield. Purdy then delivered a strike.
"We needed something," Purdy said. "We needed a spark to get the ball rolling."
Kittle bobbled the ball a few times before finally corralling it for a 30-yard gain, giving credit to his rookie QB for delivering it.
"I'm not even in the read, so I just kind of saw a space and he hadn't thrown it yet so I was just going up the field," Kittle said. "He gave me a catchable ball and I was just trying to be dramatic. Just for TV."
McCaffrey capped the 91-yard drive with his TD run.
The Cowboys still had a shot late when they took over at their own 18 with 2:59 remaining, trailing 19-12 after Robbie Gould's fourth field goal of the game capped a nearly eight-minute drive.
But Prescott threw two consecutive incompletions and was sacked on third down. Coach Mike McCarthy opted to punt on fourth-and-10 with all three timeouts left.
Purdy started the next drive with a 16-yard completion to Kittle and San Francisco didn't give the ball back to Dallas until there were 45 seconds left. The Cowboys took over at their 6 and never got close from there.
"I like to be in those positions," Prescott said. "We just weren't able to get anything going."
Purdy, the last pick in the draft last April, improved to 7-0 as a starter since replacing an injured Jimmy Garoppolo early in Week 13.
He went 18 for 28 for 215 yards with no turnovers against the Cowboys, joining Joe Flacco (2008) and Mark Sanchez (2009) as the only rookie QBs to win two playoff starts.
"I'm not shocked anymore," McCaffrey said. "It's just who he is now."
The NFL's top two scoring teams over the past 13 weeks had trouble getting going as the defenses led by All-Pros Nick Bosa of San Francisco and Micah Parsons of Dallas controlled the play.
The Niners picked off Prescott twice in the first half, turned those into field goals by Gould and led 9-6 at the break.
The Cowboys scored the only TD of the first half with Prescott connecting with tight end Dalton Schultz for the third time this postseason. But Maher's low extra-point attempt was blocked by Samson Ebukam.
Maher got some redemption when he made a 25-yard field goal that tied the game at 9 early in the third quarter after Ray-Ray McCloud fumbled a punt return at the San Francisco 21.
"That felt like legit playoff football," Bosa said. "That's a really good team."