ANN ARBOR, Mich. (AP) — Colston Loveland caught two touchdown passes and a 2-point conversion, helping Michigan beat Michigan State 24-17 on Saturday night. As the final seconds went off the clock, players threw punches in the middle of the field two years after a skirmish broke out in the tunnel between the rivals.

The melee was triggered after Loveland and Michigan State defensive end Anthony Jones pushed, shoved and butted helmets, after quarterback Davis Warren took a knee to let the remaining time run out. “It was heat-of-the-moment type stuff,” Loveland said. Michigan and Michigan State players left the sidelines to join the fray.

“I told the team that was unacceptable,” Michigan coach Sherrone Moore said. The Wolverines (5-3, 3-2 Big Ten) ended a two-game losing streak and earned a much-needed win with a challenging schedule remaining in the regular season to earn a bowl bid under first-year coach Sherrone Moore. “It was huge for our kids to get the victory,” Moore said.

The Spartans (4-4, 2-3) gained 130 yards and had the ball for 13-plus minutes on their first two possessions, but had just a 7-0 lead to show for it. Aidan Chiles lost a fumble late in the first half that helped Michigan build momentum and earn a 9-7 lead at halftime. Chiles bounced back later in the game, throwing a 20-yard touchdown pass to freshman receiver Nick Marsh with 6:12 remaining.

Chiles led the Spartans to the Michigan 16 with 2 minutes left and on fourth-and-5, he threw an in.