There were several scary moments in Champaign on Friday night, but Maryland escaped with a victory.

With the game tied at 17-17 with 3 seconds remaining, Terrapins kicker Joseph Petrino trotted onto the field to attempt a game-winning 32-yard field goal to help push his team to a 3-0 start.

There was never any doubt.

Despite Illinois’ attempt to freeze the kicker, Petrino delivered a perfect boot through the uprights and lifting Maryland to a 20-17 victory in their B1G opener. With the win, the Terps are now halfway to bowl eligibility.

Here’s the game-winner:

Maryland’s game-winning field goal try was set up by an 8-play, 86-yard drive on the previous possession. Trailing Illinois 17-10 late in the fourth quarter, the Terrapins were able to put together a string of big plays and reach the end zone to tie the score.

That drive was capped by a 10-yard touchdown toss from Taulia Tagovailoa to Tayon Fleet-Davis:

Tagavailoa had a huge game, completing 32-of-43 pass attempts for 350 yards and a touchdown. He also rushed for 25 yards on 6 carries. The Terps were led in rushing by Fleet-Davis, who had 66 yards and a score on 11 carries.

Dontay Demus Jr. was the leading receiver with 77 yards on 8 receptions.

Maryland will have a chance to improve to 4-0 next week with a home game against Kent State to round out nonconference play.