CHAMPAIGN, Ill. — In a game that strived to emulate high school football, nothing perhaps epitomized Friday night lights like the game resting on the kicker.

Joseph Petrino had both made and missed a 32-yarder earlier in the evening. So, it was only fitting that he had one more chance to hit from 32 yards out, this one deciding Maryland’s fate. He had never made a game-winning kick to that point in his career.

And he drilled it. Petrino’s teammates rushed onto the field, grateful and lucky to have escaped Illinois, 20-17.

“You can miss one, but you just have to come back,” Petrino said. “You just have to respond.”

That followed the Terps’ rally to tie the game with just over two minutes remaining. Down a touchdown, a sputtering offense found its efficiency, marching 86 yards in 2:37. The rally was capped by Tayon Fleet-Davis’ touchdown on a 10-yard swing pass, his second score of the evening.

[Mike Locksley heads back to old stomping ground when Maryland football meets Illinois]

Yet the contest only got to that point because of a Fleet-Davis mistake. As Maryland was closing in on taking a two-score lead early in the third quarter, he fumbled it away in the red zone. That turned into a 93-yard scoring drive for the Fighting Illini, finished by Josh McCray’s 38-yard run that dragged Illinois into the end zone for the first time all game.

Then, early in the fourth quarter, third-string Illinois running back Reggie Love broke loose for 25 yards. Maryland safety Jordan Mosley punched the ball out, a flicker of hope for his Terps side.

Yet the only man upfield was Casey Washington. The Illini wideout quickly switched from blocking to seeking, picking up the rolling ball and breaking away for the oddest of 30-yard scoop-and-scores.

“The guys had every reason to cash it in when things didn’t bounce our way,” coach Mike Locksley said. “When we needed to make plays on defense and offense and special teams, all three phases made the plays.”

Still, there was one more backbreaking drive for Maryland. (3-0, 1-0 Big Ten). After Washington’s touchdown, the Terps marched into Illinois territory. Facing third-and-medium, Taulia Tagovailoa found Dontay Demus breaking free for a 41-yard would-be-tying touchdown.

But it was called back due to a chop block. And on the next play, Tagovailoa was sacked for a seven-yard loss, no receiver able to find an opening.

[Chig Okonkwo provides a sure hand for Taulia Tagovailoa and Maryland football]

Fleet-Davis and his Maryland teammates redeemed themselves, though, with the tying score. They overcame adversity, one of Locksley’s pillars this season.

“I think that showed a tremendous amount of maturity,” Locksley said. “What we always keep harping to our guys is we’re going to play the next play. … Nothing you can do about it once it happens other than get your focus back and make the next play. And [Fleet-Davis] made a big play for us there.”

The action made up for a listless first half, one in which the Terps couldn’t finish drives and the Illini couldn’t move down field with ease. Both sides were flustered and limped into a 3-3 draw at the break.

That was the yin and the yang Friday night at Memorial Stadium. Just when it seemed like Maryland would pull away, Illinois (1-3, 1-1) kept it close. But when the Illini had a chance, they faltered.

It was an ugly contest, marked by penalties, turnovers, a bevy of red zone stands and unusual plays. But the Terps never wavered.

And, anchored by Petrino, they ultimately got it done.

“We have so much faith and trust in Joe. He makes kicks like that every day,” Tagovailoa said. “This was his moment to shine.”