Terrance Williams gives the Cowboys their first lead of the day with less than three minutes remaining. Dallas will play at Green Bay next week. (Ronald Martinez/Getty Images)

The yellow flag floated to the turf, and the weight of two decades started to lift Sunday afternoon on the Detroit Lions’ sideline. Their fourth-quarter drive would continue deep inside Dallas Cowboys territory. They could salt away the clock, likely add to their lead and stem Dallas’s charge. The Lions would earn their woebegone franchise’s first playoff victory since 1991, no longer a sad sack to be bullied.

As they celebrated and planned the first-down play on the visiting sideline of AT&T Stadium, referee Pete Morelli walked back to the middle of the field. Lions players would later say they had never seen anything like it. “There is no penalty on the play,” Morelli said. No further explanation came. As quickly as Detroit had seized control, Dallas had been granted reprieve.

Of all the moments that shaped the Cowboys’ 24-20 comeback victory in the first round of the NFL playoffs — the Lions’ blistering first half, the fourth-down conversion that led to Tony Romo ’s game-winning touchdown toss to Terrance Williams with 2 minutes 39 seconds remaining, DeMarcus Lawrence’s game-sealing sack of Matthew Stafford — none will linger like the pass interference penalty that was and then, suddenly, wasn’t.

Rather than hold the ball at the Dallas 30 with a fourth-quarter lead, the Lions punted. Rather than end nearly a quarter century of futility, the Lions continued it. Rather than beat the league’s signature franchise, they wondered whether the Cowboys’ elevated status had been held against them when Morelli overturned the pass interference call on Dallas linebacker Anthony Hitchens.

“What do you expect when you come to Dallas?” Lions safety Glover Quin said. “Ain’t gonna speculate that. But the league likes the story lines and headlines. I’m not getting into that.”

Cowboys outside linebacker Anthony Hitchens gets hit in the back by a pass intended for Lions tight end Brandon Pettigrew in the fourth quarter. The play was first ruled pass interference, then changed to no penalty. (Richard W. Rodriguez/AP)

A slight undercurrent of conspiracy theory ran through the Lions’ locker room. Some wondered whether the wide-reaching appeal of the Cowboys and the potential of a marquee Green Bay-Dallas matchup in the second round had any effect on the game. As players discussed the play, one Lion muttered to another, “You know there’s Dallas fans in Alaska.”

Having survived a 20-7 third-quarter deficit, the Cowboys will face the Packers on Sunday at Lambeau Field for a chance to advance to the first NFC championship game of Romo’s career. In the Cowboys’ return to the postseason for the first time since 2009, Romo improved his playoff record to 2-3 by throwing for 293 yards and two touchdowns.

At age 34, on a day he took a pounding and refused to make a big mistake, Romo seized his best chance at winning a Super Bowl. After he took the final knee, Romo waded through a pack of photographers and patted Coach Jason Garrett on the shoulder, congratulating him on the first playoff victory of his career.

The Lions remained the same star-crossed franchise they entered as, while Stafford failed at his second career chance at a playoff victory. They stormed out to a 14-point lead, led by 10 points at halftime and never trailed until less than three minutes remained. They have endured football misery for decades in Detroit, but Sunday afternoon brought a unique pain.

Defensive tackle Ndamukong Suh walked out of his postgame news conference with tears in his eyes. He returned a few seconds later, barely composed. “I apologize; I’m just speechless,” Suh said. “I feel like we played as hard as we could. We put it all out there. I just didn’t expect this outcome. It’s sickening.”

The baffling officiating decision midway through the fourth quarter keyed the final portion of the Cowboys’ comeback. On third and one from the Dallas 46-yard line and the Lions clinging to a 20-17 lead, Stafford tossed a deep pass to tight end Brandon Pettigrew, slightly underthrown toward his back shoulder. Hitchens sprinted at Pettigrew, hands raised and back to the play, and made contact with him as the pass arrived.

“He kind of ran through me as I tried to get back to the ball,” Pettigrew said.

Even before he saw a flag, Pettigrew thought the official would call pass interference. When the flag came, the Lions exulted.

“That’s certainly a big point and a momentum shift for us,” Pettigrew said. “We’re driving the ball, going down to score.”

Morelli announced the call. Officials marched off the yardage, spotting the ball close to the 30-yard line. And then a moment later, without further explanation, Morelli announced there was no flag on the play.

“The back judge threw his flag for defensive pass interference,” Morelli said afterward, according to a pool report. “We got other information from another official from a different angle that thought the contact was minimal and didn’t warrant pass interference. He thought it was face-guarding.”

Face-guarding is not a penalty, but Pettigrew believed Hitchens had made contact with him and blocked his path to the ball. The decision both angered and confounded the Lions.

“They didn’t give me a good enough explanation,” Detroit Coach Jim Caldwell said. “I’ll just leave it at that.”

Quin, the safety, said an official told him Hitchens only made contact after he had tipped the ball, which negated the pass interference call. Even if that held water, players still raged at the process.

“It’s frustrating,” Lions safety James Ihedigbo said. “I’ve been in the NFL for eight years, and I’ve never seen that. I’ve never seen a call made where it’s pass interference, where they mark off the yardage, they’re getting ready to spot the ball and then they look at the Jumbotron and say, ‘No, it isn’t pass interference.’ I’ve never seen that before. Ever.”

“I’ve never seen something like that,” Lions center Dominic Raiola said. “I just don’t know what to say. I really don’t. I can’t come up with an answer to that.”

Even Morelli admitted he hadn’t seen a play unfold like that. “No,” he said. “Not particularly.”

To make matters worse for the Lions, punter Sam Martin shanked his punt off the side of his foot, resulting in a 10-yard boot. The prime field position enabled Garrett to gamble on fourth and six from the Detroit 42 — and it paid off when Romo hit tight end Jason Witten over the middle.

“That,” Cowboys owner Jerry Jones said, “was a winning call.”

The Cowboys’ march continued with two pass interference calls, both legitimate and neither overturned. On third and goal from the 8, Romo dropped back and watched receivers criss-cross the back of the end zone. He spotted Williams darting to the right and fired a dart into his hands. The Cowboys had chewed up 5:38 of the fourth quarter, and they had seized their first lead. Their NFC East-winning season would continue.

The Lions’ season would end like the 23 seasons before, without a victory in the postseason. They had never come closer than Sunday, when they saw their opening for a victory and then saw it taken away.

“Right now, it sucks,” Ihedigbo said. “This one hurts.”