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.

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.