SANTA CLARA, Calif. (AP) — Christian McCaffrey scored on a go-ahead 2-yard run in the fourth quarter and San Francisco’s defense did the rest, sending the 49ers to their second straight NFC title game with a 19-12 victory over the Dallas Cowboys on Sunday.

The 49ers (15-4) used back-to-back long scoring drives in the second half to wear down the Cowboys (13-6) and win their 12th straight game. San Francisco advanced to play the Eagles in the NFC title game next Sunday in Philadelphia after losing in that round to the Rams a year ago.

The Cowboys lost for the record seventh straight 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.

The Cowboys had a shot 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 straight incompletions and was sacked on third down. Coach Mike McCarthy opted to punt on fourth-and-10 with all three timeouts left.

Rookie Brock Purdy started the next drive with a 16-yard completion to George Kittle and San Francisco didn’t give the ball back to Dallas until there were 45 seconds left at the 6. Dallas never got close from there.

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.

The 49ers took the lead on the first play of the fourth quarter when McCaffrey capped a 91-yard drive with a 2-yard run.

The drive featured a juggling 30-yard catch by Kittle and a pair of defensive holds against Dallas — including one on Donovan Wilson near the goal line that negated a third-down sack.

Maher made his second field goal of the game when he converted from 43 yards out to cut San Francisco’s lead to 16-12.

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 turned two interceptions in the first half by Prescott into field goals by Robbie Gould and led 9-6 at the half.

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.

JUST FOR KICKS

The Cowboys’ decision to stick with Maher after his four missed extra points last week looked questionable when he missed the early extra point.

There had been a dustup pregame when Maher was warming up. Trent Williams and other 49ers players tried to interfere with his attempts from San Francisco’s side of the field, leading to a brief argument.

INJURIES

Cowboys: RB Tony Pollard left late in the first half after injuring his left ankle while getting tackled following a reception. He didn’t return to the game. … DT Calvin Watkins (calf) left in the first half.

49ers: DE Charles Omenihu (oblique) left briefly in the first half but returned to the game.

UP NEXT

The 49ers would reach their second Super Bowl in the past four seasons with a win at Philadelphia.

Got a story or tip for us? Email Sports Gossip editors at tips@sportsgossip.com 

Want More From Sports Gossip? 

For all the latest breaking Sports Gossip, be sure to follow SportsGossip.com on FacebookInstagram, and Twitter.