ARLINGTON, Tex. — On one sideline, the Dallas Cowboys players bounced around anxiously, hoping their miracle had come true. On the other, the Giants players waited nervously, praying they had not been beaten by the unlikeliest of desperation plays.

Finally, the referee Scott Green emerged from the replay hood and delivered the verdict: the Giants had survived. Barely.

The surreal sequence, in which Tony Romo’s 37-yard touchdown pass to Dez Bryant with 10 seconds left was overturned because Bryant’s hand touched out of bounds just before the rest of his body landed in the end zone, spared the Giants from what would have been a brutal defeat. Instead, they escaped Cowboys Stadium with a 29-24 victory that left the Cowboys ruing their six turnovers and left the Giants — more than anything else — relieved.

“Long foul ball,” cornerback Corey Webster said of Bryant’s catch-that-wasn’t. “Maybe it looked like a home run, but he had to go back up to bat.”