COLLEGE PARK — Ranked opponents had not fared well against Maryland men’s basketball at home.

That trend continued Wednesday night as the Terps toppled No. 17 Wisconsin, 76-68, before an announced 17,950 at Xfinity Center for their fourth consecutive win and sixth in their past seven games.

The victory was Maryland’s second in three attempts against ranked competition on its home-court after a 78-74 loss to then-No. 15 Marquette on Nov. 15 and a 79-61 romp over then-No. 22 UCLA on Jan. 10. The team improved to 7-4 against ranked opponents at home during coach Kevin Willard’s three-year tenure.

Sophomore shooting guard Rodney Rice scored 11 of his team-high-tying 16 points in the second half to spark the Terps (17-5, 7-4 Big Ten) despite being saddled with four fouls for the final seven minutes, and junior point guard Ja’Kobi Gillespie scored 10 of his 16 points in the same frame and compiled seven rebounds, five assists and two steals.

Senior power forward Julian Reese accumulated 14 points and seven rebounds, graduate student small forward Selton Miguel chipped in 12 points, and freshman center Derik Queen notched his sixth double-double of the season on 12 points and 12 rebounds.

Graduate student shooting guard John Tonje powered the Badgers (16-5, 6-4) with a game-best 23 points and six rebounds. Graduate student power forward Steven Crowl accrued 10 points, nine rebounds and three assists, and sophomore point guard John Blackwell collected 10 points and three rebounds, but Wisconsin lost for the second time in its past three games.

Armed with a 32-31 lead at halftime, Maryland watched the Badgers reel off nine unanswered points in a 2:09 stretch to earn a 42-36 advantage. Even after the Terps went on a 7-2 spurt to draw within 44-43, Wisconsin scored five straight points for a 48-43 cushion with 11:02 left in the second half.

Maryland replied with an 11-0 run fueled by back-to-back-to-back 3-pointers by sophomore shooting guard DeShawn Harris-Smith, Gillespie and Rice. When the Badgers embarked on an 8-3 burst to close the gap to one at 57-56 with 5:53 remaining, the Terps countered with a 12-2 spurt that gave them a 69-58 advantage that Wisconsin did not seriously threaten in the final two minutes of the game.

The Terps outscored the Badgers, 44-37, in the second half on 48.1% shooting (13 of 27), including 63.6% from 3-point range (7 of 11). In contrast, Wisconsin shot only 27.3% from long distance (3 of 11).

A hook shot by Reese and a 3-pointer by Gillespie gave Maryland a 5-2 lead with 17:21 left in the first half, but that lasted 25 seconds before the Badgers ran off 10 of the game’s next 12 points to assume a 12-7 advantage with 15:15 to go.

The Terps capitalized on a 2:43 drought by Wisconsin with a free throw by Queen and a 3-point play by Reese to draw within one at 12-11 with 13:01 remaining. But the Badgers embarked on an 11-5 burst capped by five straight points by Winter to command a 23-16 lead that would be their largest of the period.

Maryland countered with a 7-3 spurt that ended with a rare 3-pointer from junior power forward Tafara Gapare (his first in four games) and pulled the team within 26-23 with 4:19 to go.

After Wisconsin responded by scoring three of the next five points for a 29-25 cushion with 2:26 left, Miguel drained a 3-pointer and Rice nailed another long-distance bomb to give the Terps a 31-29 lead with 1:41 remaining — their first since the score was 5-2 at the 17:21 mark. Gillespie converted one of two free throws, and Maryland weathered two free throws by senior point guard Kamari McGee to take a 32-31 lead into halftime.

Have a news tip? Contact Edward Lee at eklee@baltsun.com, 410-332-6200 and x.com/EdwardLeeSun.