49ers hang on as Cowboys botch last chance and time runs out

The San Francisco 49ers survived a last gasp by the Dallas Cowboys

The San Francisco 49ers went into Texas and are leaving with a victory over the Dallas Cowboys.

In a game fraught with tension, the NFC West Wild Card team took down the NFC East champions.

Before San Francisco escaped with the 23-17 win on Sunday it had to survive a review that turned an apparent first down on a Deebo Samuel run into a fourth-and-inches with 1:04 left.

The wait seemed interminable before the clock started to run again and San Francisco let time run down to 38 seconds before calling a timeout.

Jimmy Garoppolo appeared to have the first down but a penalty flag was thrown on San Francisco for a false start, giving Dallas a last chance.

The Niners’ punt went into the end zone and Dallas took over at its 25 with 32 seconds left.

A hook-and-lateral picked up 15 yards and left 24 seconds.

A short pass to Tony Pollard advanced the ball to midfield. The running back got the first down and managed to get out of bounds.

Another completion to Dalton Schultz moved the ball to the SF 50 with 14 seconds left.

San Francisco had confusion and called its final timeout.

Dak Prescott ran the football after the timeout down to the 24 but stayed inbounds and the clock ran out.

Prescott had to give the ball to an official to mark it. He didn’t and the Cowboys’ season was finished in a bizarre way.