EAST LANSING, Mich. (AP)Shaun Shivers ran for 115 yards and two touchdowns, including a 1-yarder in double overtime, to lift Indiana to a 39-31 come-from-behind victory over Michigan State on Saturday.

Indiana’s James Head Jr. blocked Ben Patton’s 28-yard field goal in overtime and Michigan State’s Michael Fletcher blocked Charles Campbell’s 37-yard kick to send the game to double overtime.

After Dexter Williams threw a 24-yard pass to AJ Barner to start the second overtime, Shivers ran for the game-winner. Williams threw a two-point conversion pass to Barner to give the Hoosiers an eight-point cushion.

”Once AJ caught it on the 1-yard line, we all knew that we were going to score,” Shivers said. ”We knew that they weren’t going to stop us because we’ve been running the ball good.”

Michigan State failed to score as it could only drive to the 13-yard line.

”I just want to say how proud I am of our players,” said Indiana coach Tom Allen. ”The fight that they showed today was unbelievable.”

Michigan State (5-6, 3-5) appeared to be running away with the game after building a 17-point halftime advantage, but the Hoosiers rallied in the second half.

”Our guys made some adjustments schematically,” Allen said of the Hoosiers’ second-half performance. ”Our guys made more plays and that’s what it just comes down to.”

The Hoosiers (4-7, 2-6) closed within 24-14 at the start of the second half when Shivers broke free for a 79-yard touchdown run. The Spartans responded with Elijah Collins scoring his second touchdown of the game on a 31-yard burst through the line.

Indiana’s Jaylin Lucas, who had 168 kickoff return yards, returned the ensuing kickoff 88 yards for a touchdown. Following an interception of a pass by Payton Thorne, the Hoosiers’ Campbell made a 40-yard field goal to cut it to 31-24.

Josh Henderson tied the game at 31 with 12:59 left on a 1-yard run. Michigan State had a chance to win the game in regulation but Patton missed a 22-yard field goal as time expired.

”It’s obviously not a very exciting time in the locker room,” said Thorne, who threw for 298 yards and two touchdowns. ”Guys are a little bit in disbelief how the game ended. And it stinks. It’s not exactly, `Hey, onto the next one,’ in the locker room. Sometimes, you gotta soak it in for a little bit.”

THE TAKEAWAY

Indiana: The win snapped a seven-losing streak for the Hoosiers. Indiana is now 2-15 in league play over the past two seasons.

Michigan State: The Spartans blew a chance to become bowl eligible and will now need to win next week at Penn State. The loss broke a two-game winning streak for Michigan State.

FIRST START

Williams made his first career start at Indiana. While he completed 2 of 7 passes for 31 yards, he ran for 86 yards on 16 carries, including 34 yards for a touchdown on the game’s opening drive. His second pass completion came in the second overtime and was the most important one.

”I just did what this team needed me to do,” Williams said of his play in overtime. ”I knew I needed to come back locked in. I knew they needed me to push the ball down the field at some point in this game.

UP NEXT

Indiana: Hosts Purdue on Nov. 26 in the regular season finale.

Michigan State: Closes the regular season Nov. 26 at No. 11 Penn State.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/AP-Top25. Sign up for the AP’s college football newsletter: https://apnews.com/cfbtop25.