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. 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.

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.

BENGALS 27, BILLS 10

Joe Burrow threw two touchdown passes, Cincinnati’s defense swarmed Josh Allen on a snow-slicked field and the Bengals beat Buffalo to advance to to their second straight AFC championship game.

Damar Hamlin’s inspirational presence while watching the game from an end-zone suite was not enough to spark the Bills in a rematch of a regular-season game that was canceled on Jan. 2 when the Bills safety went into cardiac arrest and had to be resuscitated on the field in Cincinnati.

Instead, it was ”Joe Cool” showing poise while playing in a persistent snowfall.

Burrow completed his first nine passes for 105 yards, helping Cincinnati to a 14-0 lead after its first two possessions. Ja’Marr Chase had a 28-yard TD catch 3:20 into the game, followed by Burrow’s 15-yard TD throw to Hayden Hurst eight minutes later. Joe Mixon scored on a 1-yard run, and Evan McPherson made field goals from 20 and 28 yards for the Bengals, who never trailed.

Cincinnati (14-4) advanced to consecutive AFC championship games for the first time in franchise history, and will again travel to play Patrick Mahomes and the Kansas City Chiefs. The Bengals beat the Chiefs 27-24 to advance to last year’s Super Bowl, which they lost to the Los Angeles Rams.

Burrow went 23 of 36 for 242 yards. Mixon rushed for 105 yards.

The Bengals held one of the NFL’s top offenses to season-low 10 points as the Bills (14-4) lost in the divisional round for the second straight year. Allen finished 25 of 42 for 265 yards, with a rushing TD and an interception.

AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL