It took the entire 60 minutes, but Michigan State got the job done. It took a miraculous catch by Darrell Stewart, a long run by Brian Lewerke and a game-winning kick from Matt Coghlin.

Michigan State pulled out a 40-31 win over Indiana on Saturday, getting a game-winning field goal from Coghlin with 0:05 left and the Spartans fell on a loose football in the end zone at the end of the game to make the final a two-possession outcome.

Craziness ensued after Indiana engineered a game-tying drive with the score at 31-24 late in the final quarter. Michael Penix found Whop Philyor in the end zone for an 11-yard touchdown catch to tie the game at 31-31. On the first play of Michigan State’s next drive, Lewerke hit Stewart deep down the field for a 44-yard reception. On the next play, Lewerke ran 30 yards, putting the ball on the IU 1-yard line and eventually setting up the game-winning opportunity for Coghlin.

Below are videos of Stewart’s catch and Coghlin’s field goal:

The Spartans were on the right side of a thrilling game.

With the win, Michigan State improves to 4-1 on the season and is 2-0 in the B1G. Next week, the Spartans travel to Columbus for a major showdown with Ohio State.