ANN ARBOR, Mich. (AP) -- Bo Ryan watched the ball leave his freshman guard's hands and realized there was only one way it could go in.
"It had to bank," the Wisconsin coach said. "I knew it was long."
Sure enough, Josh Gasser's 3-pointer bounced off the glass and through the net at the buzzer, giving the 12th-ranked Badgers a 53-52 win over Michigan on Wednesday night. The Wolverines had double-teamed Jordan Taylor, forcing him to give up the ball, but Gasser's shot went in, dealing a severe blow to Michigan's NCAA tournament hopes.
"I didn't have time to set my feet or take a jump shot. I just heaved it up there so that we'd at least have a chance," Gasser said. "As soon as I let it go, I knew it was going to be off the board, but I thought it had a chance to bank in. I wasn't planning that, but I knew it was too hard but on line."
The Wolverines (17-12, 7-9 Big Ten) led by two, but Darius Morris missed the front end of a one-and-one with 30.8 seconds remaining. Michigan still had four fouls to give and used them all, forcing Wisconsin to inbound the ball again each time.
The last foul came with only 5.4 seconds left, but that was enough time for one more shot. Gasser was able to get it off from just to the right of the top of the key.
"I've had some buzzer-beaters in my life, but not on a stage like this, and I've certainly never banked in a winning 3 before," said Gasser, who finished with five points.
After his shot went in, the Wisconsin bench emptied and formed a celebratory pile near midcourt.
Taylor scored 20 points for Wisconsin (21-6, 11-4).
Tim Hardaway Jr. had 16 points for Michigan, which went 5 of 11 from the free throw line.
"It hurts," Michigan's Evan Smotrycz said. "I've never been in a game like this - not on the losing end. When that shot went in, I wasn't sure it was real. I couldn't believe it."
Wisconsin shot only 36 percent from the field and went 8 of 29 from 3-point range. Taylor was 3 of 6 from long distance and Keaton Nankivil was 3 of 7. The rest of the team was 2 of 16, but that included Gasser's winner.
It was probably the most heartbreaking loss of the season for the Wolverines, and there have been a few. Michigan was not expected to win much this season with a young team, but the Wolverines took Kansas to overtime and nearly knocked off Ohio State at home.
"Sometimes it's just poise and moxie - you win more than you lose," Michigan coach John Beilein. "Sometimes you just can't catch a break, and you have those situations. We're doing everything we can to win. That would have been a good one to get."
Michigan started 1-6 in conference play but was inches away from returning to .500 in the Big Ten on Wednesday.
Nankivil scored 13 points for the Badgers, and Jon Leuer added 12 points and 12 rebounds.
Jordan Morgan scored 12 points for Michigan.
Michigan led 31-30 at halftime after making 12 of 18 shots. Taylor and Leuer kept Wisconsin in it by combining for 21 points in the first half.
The Badgers started the second half 1 of 8 from the field, but Michigan couldn't pull away. In fact, when Nankivil finally broke the drought with five quick points, Wisconsin led 37-36.
After Taylor put the Badgers up 48-45 with a long two-pointer from the right corner, Morris scored from inside and Hardaway sank a 3-pointer from near the top of the key to put Michigan back in front.
Gasser tied it at 50 with 3:00 left, but Morgan scored inside with 2:41 to play.
For a while, it seemed that basket might hold up until the end of the game, especially when Michigan used its fouls to leave Wisconsin with little time to find an open shot.
"If we were in the same situation, we'd do the same thing," Ryan said. "They did it the way they had to do it, and Jordan just made a better play than their double team."
That left Gasser with just enough time to rush one more shot up, giving Wisconsin its 10th straight win over Michigan.