With less than two seconds remaining in the first half Saturday, Terrapins men’s basketball center Diamond Stone’s frustrations boiled over.

An anemic offense had put the Terps in a 16-point hole and left coach Mark Turgeon and his team barking at officials. A program-record 27-game home winning streak was in peril when Stone scrambled for a loose ball seconds after he was stuffed under the basket.

When Stone reached for the ball, he got tangled up with Wisconsin forward Vitto Brown. Both fell to the floor in a heap, and when Stone rose up, he pushed Brown’s head onto the floor as Stone was shoved in the back. Players and officials had to separate Stone and Badgers forward Charlie Thomas while the Terps faithful booed.

While Stone remained in the game — the officials assessed Thomas and Stone a technical and flagrant one foul, respectively — the freshman phenom’s outburst summed up a disappointing afternoon for the No. 2 Terps in a 70-57 loss to Wisconsin at Xfinity Center. Brown had a game-high 21 points, and the Terps had a season-low point total despite 10 points from Stone on 5-for-6 shooting. Guard Rasheed Sulaimon led the Terps with 17 points.

The Terps’ first-half frustrations translated into their first home defeat since Dec. 3, 2014.

“I feel like we came out with our foot in the mud and we were slow getting to everything,” Sulaimon said. “We have to be better than that.”

While Sulaimon and Stone carried the Terps offense, sophomore guard Melo Trimble had one of the worst offensive games of his career. The Big Ten Preseason Player of the Year was 1-for-14 from the field, including 1-for-9 in the second half, and had 10 points. He dished out six assists but had five turnovers.

The Terps (22-4, 10-3 Big Ten) were at their worst during an 8 minute, 22-second scoreless stretch midway through the first half that included seven turnovers. The Badgers (16-9, 8-4) took advantage with a 17-0 run, turning a seven-point Terps lead into a double-digit lead of their own.

“This is the first time I thought our offense affected our defense,” Turgeon said. “The frustration mounted. We lost the game in the last 10 minutes of the [first] half.”

The Terps, facing their largest halftime deficit of the season (15 points), battled back in the second half. Buoyed by a full-court press and an aggressive defense, the Terps cut the deficit to six with more than 10 minutes remaining in the contest. But the Badgers always appeared to respond with a crucial basket or a defensive stop.

“It seemed like whenever we were in the game at some points they would go on and hit the big shots and get the offensive rebounds,” senior forward Jake Layman said. “Those are the things we need to clean up on.”

The Badgers outrebounded the Terps, 40-30, and pulled down 13 offensive boards. The Terps struggled from the free-throw line, too, going 12-for-22.

The Badgers had already taken the Terps to the wire Jan. 9 in Madison, Wisconsin, weeks after legendary Badgers coach Bo Ryan had retired. Trimble rescued the Terps with a game-winning 3-pointer with seconds remaining in a 63-60 win.

“Coach Greg Gard has done an unbelievable job with his team,” Turgeon said. “When I shook hand at his place, I knew they were on the right track.”

After the game, the Badgers didn’t have anything to say about the incident at the end of the first half. Turgeon didn’t see the play but said he would watch the film and talk with Stone.

The somber atmosphere in the postgame press conference contrasted sharply with the pregame atmosphere. Enthusiastic students crowded into the arena hours before tip and provided an environment reminiscent of last year’s top-15 clash between the Badgers and Terps. Former Terps star Dez Wells, who had a game-high 26 points in last year’s victory against the Badgers, was even sitting courtside.

This time, though, it was Wisconsin that secured a signature win and continued a seven-game winning streak.

So as the clock wound down late in the second half, fans started to file out of the arena with the Terps trailing by double digits. Wells, who had been animated with fist pumps throughout the night, gazed down at his cellphone.

He couldn’t bear to watch.