As Maryland streamed onto the field in celebration, Brock Walker could only hang his head. The Minnesota kicker had nailed six extra points through four quarters. But in overtime, he couldn’t hit the game-tying seventh — sending the ball sailing wide right.

That sealed the Gophers’ fate, but to get there, the Terps needed to pull off a late 17-point fourth quarter comeback. That surge was capped by Jake Funk’s touchdown with three-and-a-half minutes left, finishing a career day for the senior.

And Maryland looked like a different team than the squad that fell to Northwestern last week. Though the Terps continued to struggle on the defensive side of the ball, Taulia Tagovailoa led the offense to a strong showing in their home opener. And it proved to be enough on the night in Maryland’s dramatic 45-44 overtime win.

“We knew we were capable of that the whole time,” Funk said. “We just needed a spark.”

[“He’s a gym rat”: Maryland football is unconcerned with Taulia Tagovailoa’s poor debut]

The Terps (1-1) settled into a rhythm early. Tagovailoa led an 11-play, 82-yard drive in which Maryland balanced the run and pass, sprinkling in a few big plays with consistent downfield progress. It culminated in an eight-yard pass to Funk to open the scoring.

It was a preview of what was to come for the sophomore on Friday. For most of the night, Tagovailoa stood in the pocket with confidence. And when the pocket did collapse, he showed off his wheels, tallying 59 rushing yards in addition to his 394 passing yards while racking up five total scores.

“Last week was more of a surprise for us than what we saw this week,” coach Mike Locksley said. “It was great to see him bounce back.”

While the early outburst appeared to be the perfect antidote to Maryland’s previous offensive woes, Mohamed Ibrahim helped the Gophers (0-2) keep pace with the Terps. The Baltimore native set the tone on Minnesota’s second drive, rushing on six of the team’s eight plays in the series before punching it in from one yard out.

Tagovailoa responded quickly, finding Jeshaun Jones for a 76-yard touchdown. But that would be the end of the Terps’ offensive burst, with Locksley’s squad stagnating toward the end of the first half.

Meanwhile, the defensive struggles that plagued Maryland last week reared their ugly head.

Ibrahim slashed through Maryland’s front seven, adding three more first half touchdowns to give the Gophers a 28-21 halftime lead.

“Minnesota has a really good offense. They continue to do the same things every year and they’re good at it, they’re efficient at it, they know how to run their plays,” defensive end Lawtez Rogers said.

[Maryland football looks to bring more energy on defense following Northwestern beatdown]

And it was more of the same at the start of the second half. First, it was a 39-yard touchdown pass to Chris Autman-Bell from Tanner Morgan. Then, a 25-yard field goal to push the lead to 17.

All the while, Maryland squandered its best scoring chance since the first quarter. After marching to the Minnesota one-yard-line, Peny Boone fumbled as he attempted to reach the end zone. It was a self-inflicted, drive-killing error, the kind that occurred all too frequently last year.

“You’re not going to win a lot of games when you have the type of penalties and turnovers that we have,” Locksley said. “We got to get it cleaned up.”

But as the night wore into the fourth quarter, the Terps gained life. Tagovailoa hit Dontay Demus Jr. with a 15-yard strike to cut Maryland’s deficit to 10, and the defense forced its first stop since the opening drive.

Tagovailoa orchestrated a nine-play drive that ended in a 51-yard field goal, bringing the score to 38-31. Then came one more stop, and Funk — who had a career high 221 yards — broke off rushes of 31 and 19 yards, crossing the end zone on the latter to tie the contest at 38. The comeback was complete. It was a brand new ballgame.

The Terps capitalized quickly in overtime, as Tagovailoa rushed in from two yards out to put Maryland up 45-38. But the Gophers responded with a two-yard score of their own by Seth Green, setting up Walker for the extra point.

And when it mattered most, the ball sailed wide of the uprights. Tagovailoa was in shock. His teammates stormed the field. The comeback was sealed, and shouts of delight echoed around an empty Maryland Stadium.