Dallas kicker Dan Bailey (5) celebrates with teammate Chris Jones after booting a 35-yard field goal on the last play of the game to give the Cowboys a 24-21 victory over the New York Giants in East Rutherford, N.J. (Bill Kostroun/Associated Press)

The ball left the foot of Dallas place kicker Dan Bailey. It had 35 yards to travel, flipping end over end through the frigid New Jersey night. It was in the air for all of two seconds, but it might as well have been the Cowboys’ whole season hanging in the balance.

“That’s not a stretch,” Cowboys owner Jerry Jones said later.

Miss and the Cowboys would’ve faced not only the uncertainty of overtime but more criticism about their coach, their personnel, their future. “There’s no question, it knocks a hole in the side of the ship,” Jones said.

But Bailey’s kick split the uprights as the final seconds ticked slowly off the clock. The Cowboys survived a late scare to top the New York Giants, 24-21, at MetLife Stadium, snapping the surging Giants back to reality and for the first time creating a bit of space in the lackluster NFC East division race.

Jones knew exactly what was at stake for those two cold seconds: The win improved the Cowboys’ record to 6-5, pulling them into a first-place tie with the Philadelphia Eagles, who were idle this weekend.

Bailey’s kick landed square in the stomach of the Giants, who rode a four-game winning streak into Sunday’s game. New York fell to 4-7, closer to the basement-dwelling Redskins (3-7) — next Sunday's opponent — than to the top of the division.

Giants cornerback Prince Amukamara tallied out loud the Cowboys’ four division wins compared with his own team’s one and realized what the loss probably meant. “I think it would put us out of the race,” he said.

Quarterback Tony Romo completed 23 of 38 passes for 250 yards in a steady but hardly spectacular showing. The Cowboys struggled at times to run the ball, and their defense is still best viewed through squinted eyes. But they were good enough to rebound sufficiently from a 32-point waxing dealt by the New Orleans Saints their last time out Nov. 10 and survive New York’s fourth-quarter theatrics.

Riding a renewed ground attack, the Giants trailed 21-13 when they marched 58 yards down the field late in the game. Quarterback Eli Manning hit wide receiver Louis Murphy Jr. with a four-yard touchdown pass with 4 minutes 53 seconds remaining, and running back Andre Brown punched in a two-point conversion to tie the score at 21.

The Cowboys took over at their 20 with 3:28 on the clock. Romo inched his offense forward — he was 6-for-9 passing for 67 yards on the final drive — which allowed Bailey to trot onto the field with two seconds remaining to calmly line up the game-winning kick.

“He’s a good quarterback,” Giants defensive end Jason Pierre-Paul said. “He normally makes mistakes, but a game like this where you really need it, you don’t know what’s going to happen. He drove the ball on us. That last drive we couldn’t get off the field.”

The Cowboys will gladly take the win back to Texas, where they should get a brief respite from questions concerning Coach Jason Garrett’s future. Just three days earlier, Jones gave his coach a public vote of confidence, but blowing a 15-point second-half lead has a way of reigniting flames.

“It would’ve been some sad times over these next coming weeks had we not won this game tonight,” Jones said.

Because it’s the Giants and because this is the NFC East, the highlights Sunday seemed as improbable as the bloopers. The Giants’ first touchdown came at the 4:41 mark in the third when tight end Brandon Myers caught a Manning pass and fell to the ground near the goal line in front of a pair of disinterested Dallas defenders — safety Jeff Heath and linebacker Bruce Carter — neither of whom bothered to lay a hand on Myers. Myers bounced up and bounded across the goal line to cut the Dallas lead to 21-13.

By then, the Giants had already squandered enough opportunities. Late in the first quarter, with both teams still scoreless, the Cowboys mounted what looked to be the game’s first scoring drive. On first and 10 from the New York 36, Dallas wide receiver Dez Bryant beat Antrel Rolle off the line, but the ball popped out of Bryant’s hands and landed in Rolle’s.

The Giants didn’t have the ball for long. Three plays later, Victor Cruz caught a five-yard pass and was immediately engulfed by white jerseys. Though his progress appeared to stall, officials allowed the play to continue, and cornerback Orlando Scandrick ripped the ball loose. It floated into the waiting hands of Heath at midfield, and the rookie sprinted 50 yards down the sideline for the game’s first score.

“You hope that the whistle should blow,” Giants Coach Tom Coughlin said. “For them to have a touchdown on a play like that is just unbelievable.”

Manning finished the game 16-for-30 passing for 174 yards, struggling to find a rhythm in below-freezing temperatures. Unimaginative play-calling limited his options and kept him from looking too far downfield. He also was without injured wide receiver Hakeem Nicks and hooked up with his top receiver, Cruz, just twice.

“We had our chances,” Giants cornerback Terrell Thomas said. “We shot ourselves in the foot. . . . We knew we had to win this game to give ourselves a chance, to keep the dream alive.”