Maryland’s defense was on the verge of crumbling.

Nebraska reached the Terps’ goal line late in the fourth quarter, a drive engineered by a third-string quarterback. A touchdown would have put the Cornhuskers up seven with perhaps too little time for the Terps to score again.

But when it came time for Chubba Purdy to reach the end zone, Tarheeb Still jumped his throw to the outside for Maryland’s fifth takeaway of the game — its most impactful turnover on Saturday.

Jack Howes nailed the game-winning field goal minutes later and darted for midfield with his arms in the air. The Terps’ first win in seven weeks was powered by a defense that took advantage of a sporadic Nebraska offense and got back to what made it one of the conference’s stingiest units earlier this season.

“When we were having success … it usually started with our defense and their ability early in the year where they were getting their hands on a bunch of balls,” coach Michael Locksley said. “We’re one of those offenses that thrives off that.”

[Maryland football ends four-game losing skid with 13-10 win over Nebraska]

Maryland’s five takeaways Saturday were its most in a game since September and more than it forced in its last five games combined. The Cornhuskers’ 10 points were the fewest the Terps have held an opponent to since their win over Michigan State.

Nebraska entered the game with 22 turnovers, the most in the Big Ten. Each of them Saturday came in key moments.

“Every team has their weaknesses,” Dante Trader Jr. said. “We took advantage of it.”

Maryland’s offense failed to capitalize on either of Trader’s interceptions, but both halted Nebraska drives in a tight game. He picked off Heinrich Haarberg in the first quarter, the first of three Cornhusker quarterbacks who saw action. The safety’s next turnover came on the first play of Nebraska’s penultimate possession.

Still ended the Cornhuskers’ last drive of each half.

He picked off Jeff Sims, who relieved Haarberg, with 25 seconds left before halftime to keep the score even at the break. In the second half, his third interception of the season killed Nebraska’s hopes of a late go-ahead score.

“We were all in the right spots at the right time,” Trader said.

[‘How he goes, we go’: Maryland football eyeing more consistent play from Taulia Tagovailoa]

Beau Brade added a forced fumble when he punched the ball loose from Sims’ grasp. Brade recovered it himself, then Howes added a game-tying field goal moments later that tied the game at 10 in the fourth quarter. He converted his second field goal of the game as time expired to secure the win Maryland has been chasing for more than a month.

“We’re going bowling,” the kicker said. “You can’t be mad about that.”

The litany of takeaways made up for a mostly ineffective Maryland offense. The unit was penalized eight times for 67 yards, including three false starts, two delay of games and two separate 15-yard violations. The offense nearly matched its counterparts with three giveaways and again struggled to run the ball for most of the game.

The defense helped the offense when it was slow to string multiple first downs together — it provided three drives that started in Nebraska territory and produced three points, enough to pull ahead in Saturday’s low-scoring battle.

“They gave us a lot of opportunities to punch the ball in,” Taulia Tagovailoa said. “They told us that they got our backs no matter what.”

The suffocating defensive performance helped remove the losing stench that permeated throughout the program over the last five weeks. With five turnovers, tied for the unit’s most in a game this season, they rediscovered what made them so dominant when Maryland’s wins were coming much easier.