Junior center Frank Kaminsky and his teammates on the University of Wisconsin men’s basketball team didn’t know Bo Ryan was sick until the veteran coach mentioned it during a timeout.

“He said, ‘Keep the trash can ready,’ ” Kaminsky said, “and then I kind of took a step back because I didn’t want him to throw up on me.”

Imagine how queasy Ryan’s stomach would have been if he had to stand on the sidelines and watch another poor defensive showing from the No. 9 Badgers.

UW was far from perfect on that end of the court Saturday evening, but its performance was good enough to leave Mackey Arena with a 72-58 victory over Purdue.

Kaminsky scored 16 points to lead five players in double figures as the Badgers (17-3, 4-3 Big Ten) ended a three-game losing streak. Junior guard Traevon Jackson and sophomore forward Sam Dekker had 15 points apiece, senior guard Ben Brust scored 11 points and junior guard Josh Gasser provided 10 points for UW.

It had been 17 days since UW had beaten Illinois to win its 16th consecutive game to start the season

“It seems like longer (ago) than that,” Kaminsky said.

Kaminsky was then asked if the Badgers felt relieved to end their losing streak.

“Umm, no,” he said. “We still have a lot of basketball left in the Big Ten. This is something that will get the ball going back in the right direction, but there’s no relief because we’re still not satisfied with those three losses and we still have a lot to learn and a lot of basketball left.”

Ryan, who came down with the flu late Saturday morning, was so ill he couldn’t come to the post-game interview session, leaving associate head coach Greg Gard to take his place.

Gard called it a “great bounce-back win” and said the Badgers were “much better, much sounder” on defense after allowing three consecutive opponents — Indiana, Michigan and Minnesota — to shoot better than 50 percent.

The Boilermakers (13-7, 3-4), who got 10 points apiece from senior guard Terone Johnson and freshman guard Bryson Scott, shot 35.4 percent from the field and 17.6 percent from 3-point range.

Purdue scored 40 points in the paint — Indiana and Minnesota had produced 52 and 48, respectively, against UW — but that number could have been higher if the Boilermakers hadn’t settled for mid-range jumpers and 3-point attempts so early in the shot clock.

“Those are the shots that they actually want you to take,” Johnson said. “We were having some success getting inside. I have no clue why we reverted back to shooting bad shots.”

The Badgers were more than willing to let the Boilermakers, one of the worst-shooting teams in the Big Ten since the start of conference play, keep firing low-percentage shots.

“When you can force a team to take tough contested jump shots and close out strong on them,” Dekker said, “it’s going to help you, obviously, to get quicker stops.”

Purdue coach Matt Painter was just as disappointed with his team’s play on the defensive end.

The Badgers drew 24 fouls, resulting in 33 trips to the free throw line. UW converted 81.8 percent of those opportunities, with Dekker, Kaminsky and Jackson combining for 21 made free throws.

“Our positioning on defense was poor, so we were behind plays and so we foul,” Painter said. “And then our guys complain about the calls, when in reality I don’t think they missed too many tonight. I thought the officials were pretty good.”