Nebraska’s defense repeatedly turned away Texas. Five times Saturday, the Longhorns found themselves deep in Husker territory. Only once did they score a touchdown. Just when Texas would appear ready to seize control, Nebraska would turn away the Longhorns.

In the final moments, however, as wet snow sliced through a stiff north wind, fifth-ranked Texas made a final push. The Longhorns recovered Husker wide receiver Terrence Nunn’s fumble with just more than two minutes left in the game and drove 39 yards to set up sophomore Ryan Bailey’s 22-yard field goal — his first attempt in college.

If you were a Husker fan, it was a lot to bear — some might have had to turn away.

Bailey’s boot with 23 seconds left gave Texas a 22-20 victory, as Nebraska quarterback Zac Taylor’s desperation heave into the end zone on the final play fell harmlessly to Memorial Stadium’s drenched FieldTurf.

Nebraska quite literally had allowed what would’ve been its biggest win in at least five years to slip from its grasp.

“Not really much to say,” said Husker coach Bill Callahan, whose team dropped to 6-2 overall and 3-1 in the Big 12. “We had an opportunity to close the game. Misfortune occurred, and victory was more or less swept away on that third-down play.”

On third-and-3 from the Nebraska 36-yard line, Taylor completed a short pass to Nunn that would’ve gone for a first down had Nunn not dropped the ball after he was hit by cornerback Aaron Ross. Safety Marcus Griffin recovered.

A first down probably would’ve sealed victory for 17th-ranked Nebraska, as Texas (7-1, 4-0 Big 12) was out of timeouts.

Turns out, Bailey, a walk-on from Austin, Texas, became the most improbable of heroes, his game winner capping a fourth quarter in which the Huskers scored two touchdowns to erase a 16-7 deficit.

Texas, in winning in Lincoln for the fourth straight time, outgained Nebraska 348-340 in total offense. But the Huskers had a 241-184 edge in the second half.

Nebraska ultimately was doomed by a laundry list of mistakes, including a poor kickoff to begin the game, two lost fumbles, two dropped passes and at least three costly penalties.

Texas fumbled five times, losing only one.

“We had our chances,” Taylor said. “We felt like we could’ve beaten those guys.”

Taylor finished 15-for-28 passing for 277 yards and two touchdowns, with one interception. His production through the air compensated for a ground game that produced only 38 yards against a defense that had allowed 47.7 rushing yards per game to rank second nationally.

Texas redshirt freshman quarterback Colt McCoy (25-for-39 for 220 yards) completed 2 of 3 passes for 22 yards and rushed for 3 yards during the Longhorns’ game-winning drive.

“It was like a movie,” McCoy said of the rally. “You can’t script it any better. We didn’t have a lot of things go our way the whole game, missing field goals and some big opportunities to put points on the board. This team never lost heart.”

The temperature hovered in the 30s, and snow flurries occurred early in the game and resumed late. It didn’t do much to quiet a crowd of 85,187 at Memorial Stadium.

“I couldn’t hear anything and I couldn’t see anything,” McCoy said. “The snow was sticking in your eyes. The wind started swirling and the snow was coming down. It was a tough environment.”

Callahan said he was proud of his players in defeat.

“We made a lot of errors,” the coach said. “Nonetheless, we were in it. As a staff, we’re awful proud of those guys.”

Nebraska’s offense generally played poorly in the first half. The Huskers were held to minus 6 yards rushing, and Taylor was 5-for-11 with an interception. Safety Michael Griffin’s pick immediately preceded McCoy’s perfectly thrown 55-yard touchdown pass to wideout Limas Sweed that gave Texas a 16-7 lead four minutes before halftime.

In the final few minutes before the break, Taylor was sacked twice and lost a fumble. Texas seemingly was converging on the quarterback at will, though Callahan and Taylor said no major adjustments were needed.

“We just got a little flustered there for a couple of series,” Taylor said. “Nothing major. We were making mistakes that Texas wasn’t forcing on us. We were just doing it to ourselves.”

Meanwhile, Nebraska’s defense held firm time after time, and the Huskers pulled to 16-14 on Taylor’s shovel pass that I-back Brandon Jackson turned into a 49-yard touchdown on the first play of the fourth quarter.

After Greg Johnson’s 22-yard field goal pushed Texas’ lead to 19-14, Nebraska came back with I-back Marlon Lucky’s 25-yard touchdown pass to wideout Nate Swift, who was wide-open in the end zone. Although the Huskers’ two-point conversion attempt failed, they seemed in control.

Indeed, they were without question in control — until Nunn’s fumble.

“It’s not Terrence’s fault,” Callahan said. “This is a team game. We had opportunities to win that game sooner than that.”

Reach Steven M. Sipple at 473-7440 or ssipple@journalstar.com.