ANN ARBOR, Mich. (AP) -- A 10-point lead had slipped away in the final minutes, and it looked like the best Trey Burke and Michigan could hope for was another chance in overtime.
Then the star point guard decided to gamble, reaching in and knocking the ball away from Michigan State's Keith Appling with the game on the line.
''I take my eyes off it for a second to see their formation, and there's Trey going down the other end,'' Wolverines coach John Beilein said.
Burke's steal and dunk put Michigan ahead by two with 22 seconds remaining, and the fourth-ranked Wolverines held on for a pulsating 58-57 win over No. 9 Michigan State on Sunday. Burke had 21 points and eight assists, and he had enough energy left down the stretch to help Michigan to a much-needed victory.
The Wolverines avenged a 75-52 loss at Michigan State last month - and they rebounded from Wednesday night's stunning defeat at Penn State with an inspired performance at home.
The Spartans (22-7, 11-5 Big Ten) had the ball with the shot clock off and the score 56-all, but Burke stole the ball from Appling near midcourt and went in alone for the game's last field goal.
''I really wasn't pressuring him as hard as I felt like I could, the whole game,'' Burke said. ''I tried to turn him as many times as possible. The one time I did turn him, he kept the ball out, so I just went after it. If I was going to miss it, then I was going to be out of the play.''
Instead, he ended up with a dunk, giving Michigan (24-5, 11-5) the lead. Michigan State's Derrick Nix was fouled with 8.8 seconds left, but he missed the first free throw. After he made the second, the Spartans fouled Michigan freshman Mitch McGary, who missed the front end of a 1-and-1.
Michigan State called a timeout with 4.9 seconds left but never got a shot off. Burke stole a pass by Gary Harris to end the game.
The Michigan State loss clinched at least a share of the Big Ten title for Indiana.
It was exactly the type of game it didn't seem like Michigan could win. The Wolverines shot 0-for-12 from 3-point range and were left to slug it out inside with the physical Spartans. Michigan State had 19 offensive rebounds, but the Spartans also turned the ball over 18 times.
''They've got a good team,'' Michigan State coach Tom Izzo said. ''We did some real good things, but unfortunately, 'good' isn't good enough in this league.''
Maligned for weeks because of shaky defense, Michigan was more disruptive Sunday.
''Today it was all about grit,'' Beilein said. ''We just had to get a win, especially after our Wednesday night disappointment.''
Michigan trailed 31-28 at halftime but shut down Michigan State for extended stretches and eventually took a 52-42 lead when Burke made two free throws with 4:36 to play.
The Spartans rallied, tying it at 56 when Appling made two free throws with 54.8 seconds remaining. After McGary stepped on the baseline, the Spartans had a chance to hold for the last shot - but Appling lost the ball to Burke before Michigan State could even get a play going.
''I'm going to be kicking myself over that for as long as I'm playing basketball that I let that happen,'' Appling said. ''I should've been more aware. I kind of looked to Coach Izzo to see if he wanted me to call time out, I turned my head and took my eye off things.''
The Spartans have lost three straight - to Indiana, Ohio State and Michigan - and their tough stretch isn't over. They face Wisconsin next.
Adreian Payne had 17 points and Harris added 16 for the Spartans.
With both teams desperately trying to maintain some hope of a league title after their recent struggles, this game was intense from the start. Payne, who had attempted only 20 shots from beyond the arc all season, made two 3-pointers in the early going.
Michigan freshman Nik Stauskas played only four minutes - he didn't return after leaving with a cut over his left eye after a scramble for a rebound early in the game.
Freshman Caris LeVert filled in for Stauskas, and his layup in the final seconds of the first half cut the Michigan State lead to three. The Wolverines quickly pulled ahead at the start of the second, drawing three offensive fouls on the Spartans in the first 4:28.
Down 52-42, Michigan State chipped away, starting with a five-point possession. Harris scored while being fouled, and after he missed the free throw, Michigan couldn't come up with the rebound, and Payne ended up with a three-point play. He actually missed his free throw but was given another chance because of a lane violation.
It would have been another gut-wrenching loss for Michigan, which was ranked No. 1 in the country earlier this season but has looked worn down and inexperienced lately. The Wolverines nearly let this one slip away, but Burke was too much - at both ends of the court - for Michigan State to overcome.
''We knew that Michigan State was going to come in and try to bully us,'' Burke said. ''But we knew if we held our ground, played smarter down the stretch, we have a shot to win the game.''