NEW YORK -- After struggling with injuries and poor play most of the season, Wisconsin is peaking at the right time.
Brevin Pritzl broke a tie with a foul-line jumper with 28 seconds left and Khalil Iverson secured the win with a steal in the waning seconds, leading Wisconsin past Maryland 59-54 on Thursday in the second round of the Big Ten Tournament.
Brad Davison and Iverson each made two free throws in the final nine seconds, and the ninth-seeded Badgers (15-17) advanced to the quarterfinals against top-seeded Michigan State on Friday at Madison Square Garden after winning for the fifth time in seven games.
"It's a credit to these guys to my right and also the guys back in the locker room, how they've grown over the last month," Wisconsin coach Greg Gard said. "It has been fun to watch and hopefully we've got a lot more basketball yet to play."
The win wasn't pretty, but the Badgers made all the key plays down the stretch and eight-seeded Maryland (19-13) didn't.
The biggest plays were offensive rebounds by Iverson and Ethan Happ after Pritzl and Davison missed 3-point shots with the game tied at 53.
After the second miss with 40.3 seconds to go, Wisconsin called time out and Pritzl got the game winner 12 seconds later.
"I think, especially at the end of this game, the possessions are magnified," Davison said. "When you do things right those final possessions, you can really turn things around."
Maryland had a chance to tie the game when Kevin Huerta was fouled by Happ with 9.2 seconds to go, but he missed the first of two free throws and the Terps came up short for the seventh time in 11 games.
"I feel like we were fighting uphill all night," Maryland coach Mark Turgeon said. "We had the lead 24-23. It's the one time we had the lead. We tied it a bunch of times. It really came down to two things. We fouled too much and we couldn't get a rebound when we needed a rebound."
Happ had 14 points and seven rebounds for Wisconsin, which lost to Michigan State 68-63 less than a week ago. Davison finished with 13 points while Iverson had 11 and six rebounds and Pritzl 10 points. The Badgers, who lost starting point guard D'Mitrik Trice and reserve Kobe King to injuries in December, won despite shooting 36 percent.
"I personally figure we just have to string together an entire game for 40 minutes and just staying toe to toe with them like we did last game," Iverson said. "I know we'll be ready for them."
Wisconsin never trailed in the second half, but it never led by more than three points in the final 11:40 until the closing seconds.
Pritzl's jumper broke a 53-all tie. Huerter then missed the first free throw and made the second. Maryland fouled Davison on the inbounds pass and he made both shots with 8.5 seconds to go for a 57-54 lead.
Wisconsin fouled Cowan rather than let him attempt a game-tying 3-pointer. Since it was a non-shooting foul, the Terps had to inbound with 5 seconds to go and Iverson stole Dion Wiley's pass and then closed the game with two free throws.
"He has evolved into our defensive end stopped," Gard said. "For him to come in and make a play like that at the end to seal it was great."
SWIPE: Iverson's steal was Wisconsin's ninth. Maryland didn't have any. ... Huerter, Cowan and Fernando accounted for all but six of the Terps' points.
Wisconsin: Faces top-seeded Michigan State at noon Friday in the quarterfinals.
Maryland: Waits for the postseason tournament announcements.
More AP college basketball: http://collegebasketball.ap.org and http://www.twitter.com/AP-Top25
This story has been corrected to show that Wisconsin will play top-seeded Michigan State on Friday.