MADISON, WISCONSIN — At first, the Terrapins men’s basketball team didn’t have an answer for Nigel Hayes on Saturday.

During the opening half, the Terps’ frontcourt, including forward Robert Carter Jr., struggled to contain Wisconsin’s star forward. Hayes had 14 points in 16 minutes, nearly equaling his per game average (15.7) and kept the Badgers within four points at the break.

But in the second half, Carter helped limited Hayes to three points and 1-for-8 shooting while chipping in seven points. Carter finished with a double-double, 14 points and 11 rebounds, and after the No. 3 Terps’ 63-60 win, coach Mark Turgeon praised the redshirt junior’s second-half defensive effort.

Carter turned in a solid, if inconsistent, frontcourt performance. While the Terps surrendered 28 points in the paint and 11 offensive rebounds to a team that doesn’t have an eligible player 6-foot-10 or taller, Carter, forward Damonte Dodd and center Diamond Stone scored a combined 34 points. They were three of the Terps’ top four scorers. Melo Trimble was the Terps’ star with a game-high 21 points and a game-winning 3-pointer, but the Terps’ big man provided much-needed support and motivation.

Saturday was Stone’s first game in Wisconsin since the freshman, who’s from Milwaukee, picked the Terps over the Badgers this past spring. Stone was booed every time he touched the ball and the crowd cheered when he made a mistake. While the Badgers might have fed off the hostile environment in the Kohl Center on Saturday, the Terps drew inspiration from the fans, as well.

“Diamond just went out there and played like he normally does,” Trimble said Saturday. “He didn’t let the crowd affect him. Of course it was extra motivation for him but it was for us too.”

Stone was third on the team with 11 points on 4-for-5 shooting.

“I feel like that meant a lot to him to come back here, be able to play in front of his family and friends and get a win,” Carter said.

That result was in doubt until Trimble’s 3-pointer with two seconds remaining, partly due to the scoring prowess of the Badgers’ frontcourt. Hayes and redshirt freshman forward Ethan Happ led Wisconsin with 17 and 16 points, respectively. In the first half, especially, they showcased a variety of post moves.

Carter started the game on Hayes, and Turgeon used multiple players to guard the 6-foot-9 forward in the first half, though forward Jake Layman, who’s known for his defense, wasn’t one of them. Hayes went 5-for-7 from the field.

It was a different story in the second half. While Turgeon again used a variety of players on Hayes, Carter was the primary defender. After Carter, who was “dead tired” according to Turgeon and sat for about four minutes early in the second half, returned with 14:46 remaining. Hayes didn’t make another shot from the field.

“I just got a feel for him throughout the game,” Carter said. “It just took a little bit of time to get adjusted to him and he made some tough shots.”

While Carter and Stone are second and third, respectively, on the team in scoring, Dodd’s nine-point outing was unexpected. He’s seventh on the team with 3.8 points per game.

Dodd, who’s starting at center despite being listed as a forward on the Terps’ roster, has also struggled with foul trouble this season. He leads the team with 2.5 fouls per game (Carter and Stone aren’t far behind at 2.4 and 2.3, respectively). But Saturday, he picked up just one foul in the first half, was 3-for-6 from the field and had six rebounds, second on the team. He also pulled down three of the Terps’ five offensive rebounds.

“Once I’m not in foul trouble, and I can start off a game the way I want to start off, I’m pretty much in a good flow,” said Dodd, who guarded Hayes at times.

The Terps’ frontcourt wasn’t perfect Saturday. But they were good enough and helped created a memory Stone will likely savor.