Starting on its own 18-yard line midway through the fourth quarter Saturday night, the Maryland football team’s mindset remained the same.

The Terps play calls didn’t become conservative while nursing a four-point lead over Michigan State. They envisioned a balanced attack leading them down the field for a touchdown to put the game away.

“We were just going to keep doing what we were doing,” quarterback Perry Hills said.

Ten plays, 82 yards and about five minutes later, Maryland kicked the extra point to go up, 28-17, sealing its fifth win of the year and halting a two-game losing streak.

In a year of offensive inconsistency, the drive represented exactly what the Terps have been trying to accomplish all year.

The Terps rushed the ball seven times on the possession, sticking with the philosophy that’s yielded plenty of success in the team’s previous four wins. Maryland has rushed for an average of 289.4 yards per games in its victories this season. In its two losses, that number dropped to 150.

Freshman running back Lorenzo Harrison shouldered the load, surpassing 100 yards on 17 carries, while running back Ty Johnson’s nine rushes totaled 115 yards. The duo has emerged as the Terps’ top players in the backfield in recent weeks.

Harrison and Johnson earned touches on the Terps’ final scoring drive but weren’t the focal point. On 1st-and-10 from Michigan State’s 46-yard line, Hills rushed twice in three plays to set up a 4th-and-short opportunity that Johnson converted.

Running back Kenneth Goins Jr., who had four touches, gained 20 yards on his two rushes during the drive. Earlier in the fourth quarter, his first carry of the game resulted in the go-ahead touchdown from one yard out.

The depth at running back — coach DJ Durkin named five co-starters at the position on this week’s depth chart — helped Maryland rush for 39 yards on its penultimate drive.

“It all works together,” wide receiver Levern Jacobs said. “If we have a good day in the passing game, it’s going to open up the running game, and if we have a good day in the running game, it’s going to open up the passing game.”

Maryland hasn’t had to worry about establishing a passing game in their first four wins with its rushing dominance. But as offensive coordinator Walt Bell acknowledged, that led to issues when Penn State and Minnesota limited its space on the ground.

Hills, who finished 21-for-27 for 200 yards, feasted on Michigan State’s defense using short and intermediate throws. On Hills’ 36-yard touchdown pass to wide receiver D.J. Moore in the second quarter — his longest completion of the night — the sophomore ran wide open down the middle of the field. Hills just had to loft the ball in the air and let Moore run underneath it.

Big plays such as that have been rare for the Terps this season, but Hills’ connection to Jacobs down the right sideline was the defining play in the team’s final touchdown drive.

On that 2nd-and-8 snap on the game-clinching drive, Jacobs made a diving catch in Michigan State territory for a 34-yard gain. Later in the possession, the pair connected again, this time for a nine-yard score that closed out the victory.

With Hills back from last week’s shoulder injury, the Terps clinched the victory with diversity. When the Spartans crept toward the box, Hills beat the defense over the top. With the Terps in the red zone, they didn’t settle for a field goal.

It’s the offensive formula Maryland has been looking for all season.

“With Perry, since he’s a more experienced player, he keeps the tempo going,” Johnson said. “He’s willing to do anything to get those first downs, to get a touchdown, anything. It was great to have him back.”