Joseph Petrino kicked a 32-yard field goal as time expired to lift Maryland over Illinois 20-17 on Friday night.

But the win didn’t come easy for the Terrapins (3-0, 1-0 Big Ten) in their conference opener.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

In a game best described as weird from beginning to end, the normally explosive Terrapins consistently had trouble against a tough Illinois defense. Taulia Tagovailoa passed for 350 yards (32 of 43) but was held to only one passing touchdown.

"We had faith in Joe," Tagovailoa said. "He makes those kicks every day in practice. It was his time to shine."

Tayon Fleet-Davis carried the ball 11 times for 62 yards for Maryland. He also caught the lone touchdown pass from Tagovailoa.

Illinois quarterback Brandon Peters, in his first start since being injured early in the first game of the season against Nebraska, was effective but clearly rusty for Illinois (1-3, 1-1). He was 10-of-26 passing for 185 yards and had one interception.

Josh McCray carried the ball eight times for 60 yards and had a 38-yard touchdown run for the Illini. Chase Brown carried 14 times for 57 yards. Receiver Casey Washington had a 30-yard touchdown run.

The game got interesting on the first drive of the third quarter. Tagovailoa marched the Terrapins down the field to cap a drive with a 2-yard touchdown run by Fleet-Davis to make the score 10-3 Maryland. Illinois then went three and out, but Maryland fumbled the ball on its next drive at the Illinois 7 that prevented what appeared to be a certain score.

Illinois then put together an impressive eight-play drive capped by McCray's 38-yard touchdown run.

McCray and Brown would each leave the game in the second half with injuries, which severely hindered the Illinois offense.

Illinois coach Bret Bielema said McCray was taken to a local hospital but had no update on his condition.

The Illini took the lead in the fourth quarter, after a series of fumbles and turnovers by both teams, when Washington recovered a fumble by teammate Reggie Love III and scampered 38 yards into the end zone.

Maryland answered with a 10-yard touchdown pass from Tagovailoa to Fleet-Davis to tie the score at 17.

Illinois couldn’t put together a drive late in the game, and Maryland took advantage of a short field following an Illinois punt from its own end zone that helped set up Petrino's game-winning kick.

CLICK HERE TO GET THE FOX NEWS APP

GREAT DEFENSE

The first half featured impressive defensive play by both teams. The Illinois secondary was especially tough, and Tagovailoa had a hard time finding open receivers down field.

"Credit to Maryland, obviously they did enough in the end to execute to win," Bielema said. "I thought our guys on a short week did a lot of good preparation and got to where we want to be. Defensively, I thought we came out and did some things in the first half to limit their opportunities offensively. Unfortunately, we stalled out in some red areas."

THE TAKEAWAY

It was a tough loss for an Illinois team clearly ready for a superior opponent, while Maryland should consider itself lucky to escape with a win.

UP NEXT

Maryland: Hosts Kent State on Sept. 25

Illinois: Travels to Purdue for another Big Ten matchup on Sept. 25.