AMES, Iowa – When a week night game televised by ESPN is played in Jack Trice Stadium, the plays can be whacky and the game can be strange and at times memorable. Consult Google for a background check.

Thursday night fit the profile; Texas and Iowa State provided the drama. Momentum swings. A Hail Mary touchdown pass by the Longhorns to end the first half, a school-record 97-yard house call that put the Cyclones in charge. In the first half, UT got what turned out to be a crucial field goal provided by an Iowa State fumble created when a blocker’s foot mule-kicked the ball free.

Texas, with Red River rival/nemesis looming in its next game, could ill afford a loss on the road. Senior backup quarterback Case McCoy, who fired a career-high 45 passes, scored on a 1-yard quarterback sneak with 51 seconds remaining to give the Longhorns a 31-30 victory over the stunned Cyclones (1-3, 0-1).

Perhaps the victory was ordained by a higher power. The week started with the death of Longhorns legend James Street, who was 20-0 as the team's starting quarterback and led UT to the 1969 national championship. Texas players wore “JS” on their helmets.

“We dedicated the game and the game ball to James Street,” Texas coach Mack Brown said. "Now he's 21-0 instead of 20-0."

The outcome was decided by bounces, breaks and what ifs. The second guessers on Twitter had a field day Tweeting about play calls, particularly for Texas.

With McCoy filling in for the injured David Ash, relying on the running game seemed to be a good strategy for Texas. When Johnathan Gray broke loose for a 45-yard touchdown run to give the Longhorns (3-2, 2-0) a 7-0 lead, the fact that he finished with 15 more carries for 44 more yards, there were questions.

“Things didn’t go as well as we’d want,” UT offensive coordinator Major Applewhite said. “And I put all of that on me.”

Brown said he learned a long time ago to never pout over a win. He was far more happy than sad.

“Comeback wins on the road is something I love,” he said. “It was critical that we came back and won this game. That’s a happy lead. I feel like we’ve got back something we’ve lost.”

Brown said that Iowa State’s defense started to stack the box to take away the running game and that resulted in an offense lopsided toward the pass.

“We had some mismatches with our wide receivers against their cornerbacks that we were able to take advantage of,” Applewhite said.

In particular, senior wide receiver Mike Davis was a major problem for Iowa State. He finished with six catches for 64 yards and he also drew three pass interference penalties – two on consecutive snaps – in the second half. The Cyclones’ defense committed 70 yards of penalties after intermission. While Iowa State had a 100-yard edge in total offense, that was negated by 10 penalties for 118 yards.

After Texas built a 10-0 lead, Iowa State scored 13 consecutive points. Cole Netten’s 41-yard field goal gave the Cyclones a 13-10 lead with 33 seconds remaining in the first half. The end of the half provided sad foreshadowing for the home team.

With four seconds remaining, Texas had a second and 10 at the Cyclones’ 44. McCoy took the shotgun snap, danced away from the pass rush and heaved the ball toward the end zone.

UT’s John Harris was being pursued by linebacker Jeremiah George.

“Usually on that play you figure you’ll get knocked off your route,” Harris said. “I got a free release. I got to the end zone and looked up and there was the ball.”

“That was big,” said Texas defensive end Jackson Jeffcoat, who intercepted a deflected pass to end Iowa State’s final threat. “Whenever you can go in at halftime like that, it’s great. We were excited to go back out there for the second half.”

That excitement waned when Iowa State’s Quenton Bundrage caught a slant pass from quarterback Sam Richardson on third-and-nine from the Cyclones’ 3. Bundrage got inside UT’s Duke Thomas and safety Mykkele Thompson took a bad angle. Two mistakes and Bundrage’s speed resulted in a school-record 97-yard TD reception that gave Iowa State a 20-17 lead.

"I think adversity has already struck this team plenty of times and we keep finding ways to keep battling and staying together and sticking together," said McCoy, who equaled his career high with 26 completions.

The teams traded rushing touchdowns and the Cyclones had a 27-24 lead early in the fourth quarter. Iowa State was in position to put the game away with a first-and-10 at the Texas 13 late in the fourth quarter but the Longhorns’ defense forced a field goal.

"I thought when we forced the field goal ... and we had three timeouts in our pockets we would win the game. That's who we've been in in our past. I'm really proud of our guys," Brown said.

Two plays before McCoy scored the game-winning touchdown, Gray appeared to fumble on a first-and-goal carry from the Iowa State three. The play was reviewed by instant replay and the call on the field was upheld.

“What you witnessed tonight was two teams playing their hearts out and you could argue that both teams deserved to win the football game,” said Iowa State coach Paul Rhoads, who was highly agitated in his remarks about. “That’s hard to express. You just don’t put an arm around him and say, ‘That’s OK.’”