ARLINGTON, Texas - Brock Purdy threw touchdown passes of 74 and 66 yards to Christian McCaffrey, Deebo Samuel ran 70 yards for a score on a reverse and the San Francisco 49ers beat the Dallas Cowboys 46-40 on Sunday.

The Cowboys had cut a 19-point deficit to six in the final four minutes when McCaffrey ran away from edge rusher Von Miller on third down, caught a pass over the middle and sprinted untouched to the end zone for the second time.

That 66-yarder was the clincher.