Maryland football had searched for its sixth victory in each of its past four games entering Saturday. It hadn’t won since September.

The Terps were far from perfect against the Cornhuskers. They had 10 penalties, three turnovers and scored on just three of their 11 drives. But with three seconds left, Jack Howes took the field with a chance for a game-winning kick.

Howes drilled the 24-yard field goal as time expired. Maryland defeated Nebraska, 13-10, to clinch bowl eligibility for a third straight season and snap a four-game losing skid.

“Nothing has been easy for us, everything we do we have to fight through,” coach Michael Locksley said. “That’s why I’m proud of this team.”

The Terps’ passing attack endured an up-and-down day. Taulia Tagovailoa threw for 283 yards and Maryland’s lone touchdown, but also fired an interception for the third straight game. Only one of Tagovailoa’s first 13 attempts went for more than 10 yards. Then the Terps struck big, courtesy of Tai Felton.

A double-move from the receiver helped him blow past a Nebraska cornerback for a 53-yard reception down the sideline late in the second quarter. On the next play, Felton scored from 16 yards out for the first score of the day from either side.

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

Felton’s sequence was the highlight of Maryland’s first-half offense. Penalties held the unit back from adding on. Pre-snap infractions pushed the Terps back into third and longs on multiple occasions, which stunted multiple promising drives.

The most impactful penalty in the opening half came seconds before halftime. Maryland was in prime field goal position, but a Corey Dyches unnecessary roughness penalty pushed the Terps back 15 yards and out of range. They failed to extend their 7-0 lead entering the break as a result.

Penalties restricted Maryland’s offense in the first half. Giveaways doomed the unit to start the second half. Felton fumbled on the Terps’ first play after halftime, and Tagovailoa was intercepted on the next drive as Maryland turned the ball over on each of its first two offensive possessions of the third quarter.

The Cornhuskers capitalized on both with a touchdown after Felton’s fumble and a go-ahead field goal following Tagovailoa’s giveaway.

The Terps’ lone points of the second half were a pair of Howes field goals. But that was enough as the Cornhuskers’ offense could only muster those two scores.

[Amid a four-game losing streak, it’s clear Maryland football’s title hopes were premature]

Nebraska’s offensive identity this season has been its rushing attack — it averages over 40 attempts a game. The Cornhuskers went to their ground game early and often against the Terps, running 21 times in the first half for 84 yards. They finished with 40 carries — Emmett Johnson led the group with 17 attempts.

Nebraska utilized the rush on all seven of its first nine plays of the second half after it turned to backup quarterback Jeff Sims. Janiran Bonner scored from two yards out on just his fourth carry of the season to tie the game at seven early in the third quarter.

The Cornhuskers needed the ground game to power their offense as their passing attack struggled through a trio of quarterbacks. Sims, Heinrich Haarberg and Chubba Purdy combined to complete just 48 percent of their 21 passes. Four of their throws found Dante Trader and Tarheeb Still, who combined for a quartet of interceptions.

“Today, to go out there and do what we did, goes back to our standard and what we did in practice,” Trader said.

Beau Brade continued the Terps’ secondary’s excellence with a forced fumble of Sims early in the fourth quarter. Still’s second interception with less than four minutes left thwarted a Nebraska scoring chance and kept the game tied at 10.

The Cornhuskers still had a chance for the win if their defense stopped the Terps. But Maryland’s offense saved its best drive for last, which ended with Howes running with his arms in the air to celebrate his game-winning kick to end his team’s downward spiral.

“We’re very much in high spirits right now,” Howes said. “We’re going bowling.”