Ty Johnson rushed for 132 yards and a a touchdown for Maryland. (Michael Thomas/AP)

It was a season opener that checked every box: the country's hottest young coach making his debut with a proud and decorated program; 955 combined yards; a pick-six on the first throw of the game; endless plays of 20 yards or more; a 91-yard punt return for a touchdown; and two blocked field goals returned for touchdowns. It even had a team bursting into the 2017 season with a breakthrough victory.

The victory, however, didn't go to No. 23 Texas and its first-year head coach, Tom Herman. Saturday at Darrell K. Royal-Texas Memorial Stadium belonged to the Maryland Terrapins in a stunning 51-41 result that could be remembered as a watershed moment in the young tenure of Coach DJ Durkin.

Maryland, which entered as a three-touchdown underdog, earned its first win over a ranked opponent since 2010 and its first such win on the road since 2008. As if that weren't enough, Saturday also marked the program's most points scored against a ranked team — ever.

"This is a huge steppingstone for the program," senior linebacker Jermaine Carter Jr. said.

Aside from spoiling what was supposed to be a celebratory day for Texas in one of college football's cathedrals, Maryland instead announced itself as a much-improved team — and it did so with considerable resolve. The Terrapins built a startling 30-14 halftime lead and held off a late charge by the Longhorns, who pulled within three points twice in the second half but ultimately imploded, much the way Maryland has done against top competition for much of the past decade.

But Maryland was a completely different animal Saturday, largely because its fresh and inventive offense finally looked multidimensional against a program stocked with elite athletes. The Terrapins amassed 482 yards and rode the legs of junior running back Ty Johnson (132 of the team's 263 yards rushing) and the arm of sophomore Tyrrell Pigrome, who picked apart the Longhorns and finished 9-for-12 passing for 175 yards and two touchdowns — after his first pass of the day was intercepted and returned for a touchdown.

But with his team clinging to a 37-34 lead on the final play of the third quarter, Pigrome left the game with an apparent leg injury. He was spelled by true freshman Kasim Hill, who completed a crucial 40-yard pass to junior wide receiver D.J. Moore on third and 19 midway through the fourth quarter. Two plays later, Hill ran three yards for the decisive touchdown.

"No one said a word. There was no one like, 'Oh no,' " said Durkin, who did not offer an update on Pigrome's status after the game. "Kasim came in there and just handled the moment."

Hill (3-for-3 passing for 44 yards) and Moore (seven catches, 133 yards) helped galvanize a team that had dealt with health issues all day: Senior linebacker Jesse Aniebonam suffered an apparent lower leg injury, and sophomore defensive back Antwaine Richardson was down for several minutes late in the third quarter after suffering an apparent head injury. He was taken to a hospital, where Durkin said later Richardson was moving and responsive.

"That was hard for the whole team to sit out there and see," Durkin said.

On the play after Richardson was carted off the field, Texas pulled within 37-34 on a three-yard keeper by sophomore quarterback Shane Buechele, who completed 34 of 52 passes for 375 yards and two touchdowns but also threw an interception and was sacked five times. It wasn't enough on a day when Maryland held the Longhorns to 98 yards rushing and did what it so often failed to do a year ago — come up with stops down the stretch. That included three crucial stands in the fourth quarter, including two turnovers on downs.

"I told our guys to never get used to this feeling," Herman said, "but if we all thought that we were going to come in here and in nine months sprinkle some fairy dust on this and think we've arrived, then we're wrong."

Herman seemed perplexed by how Maryland built its 30-14 halftime lead: Pigrome running for a 25-yard touchdown and throwing a 20-yard touchdown pass to Moore; junior Derwin Gray blocking a field goal attempt just a month after joining the special teams unit and then watching sophomore Antoine Brooks return it 71 yards for a touchdown; and Pigrome carving up Texas's secondary with a 46-yard touchdown pass to senior Taivon Jacobs.

"We always talk about guys making plays and being game-changers," Gray said. "And today they were."

But it was how Maryland responded following the first-half burst — through the injuries, and especially after Texas scored on a 65-yard blocked field goal and on a 91-yard punt return to pull within 30-27 in the third quarter — that Durkin and his players will not soon forget. It included Johnson, who stunned the crowd with a 62-yard kickoff return to set up his own 40-yard touchdown run to put his team back up by 10 points in the third quarter.

It was Johnson and Moore, both of whom have watched Maryland struggle to keep up in these exact situations over their careers, who helped usher in Hill after Pigrome went down. None of them had quite ever been in that type of situation, trying to hold on to a late lead against a ranked opponent on the road, but Johnson told the rookie quarterback to take a deep breath. Moore told Hill to get ready, which he was.

"It was a breakthrough moment," Moore said, "because we worked so hard for this."