ANN ARBOR, Mich. -- 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 2-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.
The best plays from this year's NBA draft prospects
From Obi Toppin to James Wiseman, check out the best highlights from this year's NBA draft prospects.
Penn State AD Sandy Barbour addresses Pat Chambers' resignation
Penn State athletic director Sandy Barbour addresses men's basketball coach Pat Chambers' resigning after an internal investigation.
What adding a fifth year of eligibility means for record holders in men's college basketball
Will Pete Maravich's long-standing points record come down? What about Bob Hurley's assists record? John Gasaway breaks down the likelihood of which records will stay, and which could be topped.