ARLINGTON, Texas — At the time, the Giants weren’t thinking about story lines. They didn’t worry about narratives or what would make for a compelling arc.

“I didn’t care who scored the touchdown,” center Weston Richburg said. “We just needed a touchdown right there.”

Everyone else, though, probably had a feeling about what was coming.

There is one player on the Giants’ roster who can bring a fairy tale to life, whose exploits shame cheesy screenplays, who seems to have a magic touch for such moments.

And who has a dance to go with it.

Victor Cruz, who had not played in an NFL game in exactly 700 days, caught the go-ahead 3-yard touchdown pass from Eli Manning with 6:13 remaining to help the Giants earn a 20-19 victory over the Cowboys on Sunday at AT&T Stadium.

advertisement | advertise on newsday

Cruz had missed almost two full years with knee and calf surgeries, and his hold on a roster spot seemed to be in peril as late as last month. Yet there he was, swiveling his hips in full salsa mode.

This was the kind of win that had been absent from the Giants’ repertoire nearly as long as Cruz had been. As often happens in this series between NFC East rivals, the game came down to the final seconds. The Cowboys were driving for a potential game-winning field goal when Terrance Williams inexplicably stayed in bounds after a catch, and Dallas was unable to stop the clock before time expired.

It was Ben McAdoo’s first game ever as head coach. It was Cruz’s first game in what seemed like forever as a wide receiver. McAdoo saw it as a new beginning.

NFL videos

“We look through the windshield,” he said. “We’re not looking through the rearview mirror. We’re focused on everything that’s out in front of us.”

Cruz saw it as a return to the past. “A lot of people will go through injuries and they don’t get this moment,” he said. “They don’t get the opportunity to go back and reclaim what they once were, what they once had.”

Both were correct.

The Giants had not beaten the Cowboys in their eight previous Opening Day games, and they had not won any opener since 2010. Of course, many remembered last year’s debacle here, when the Giants coughed up a late lead because of a series of bad plays and poor decisions. This win not only exorcised that memory but gave the Giants a chance to watch another team make the late-game goof.

“Twelve seconds isn’t enough time to clock the ball,” McAdoo said of the clock at the start of the play, in which Williams caught the pass but could not get out of bounds.

advertisement | advertise on newsday

“This is a big win for the team and for the guys who were here last year,” Manning said. “Almost a year ago today in this same spot, we had a chance to win and couldn’t pull it out.’’

The Giants took a 7-6 lead with 9:36 left in the second quarter. Manning hit Odell Beckham Jr. for a 45-yard pass down the left sideline to the 15, then found Larry Donnell in the end zone for the score.

Dallas tacked on a third field goal to go ahead 9-7, but the Giants drove 75 yards on 12 plays to take a 13-9 halftime lead. Cruz caught three passes on the drive and rookie Sterling Shepard capped it with a 9-yard touchdown grab with seven seconds remaining in the half. Randy Bullock missed the extra-point kick wide left.

The Giants received the ball to start the third quarter and seemed to have plenty of momentum, but that ended when Manning tried to hit Shepard on a sideline route and was intercepted by Brandon Carr. The Cowboys scored their only touchdown of the game on an 8-yard run by Ezekiel Elliott to make it 16-13, and Bailey’s fourth field goal of the game gave the Cowboys a 19-13 lead early in the fourth quarter.

That’s when the salsa returned for the Giants.

advertisement | advertise on newsday

Just in time.

“That was a big play,” McAdoo said of Cruz’s touchdown. “It was good to see him out there and I know it feels good for him.”

It made for a pretty good story, too.