During one stretch in the second half of a contentious game between Maryland men’s basketball and Purdue, something clicked. One score frenzied fans, and then another, and another.

Suddenly, the Terps had built an unexpected and formidable advantage. Everyone in Xfinity Center knew it as Maryland embarked on a spectacular 29-4 second-half run.

Fans gripped the gates with a minute left. For the first time in the entire second half, time ran slow.

In the end, it all built up into one irreplaceable, spontaneous and potentially signature moment.

Pandemonium rang out in College Park. Maryland faithful raced onto the hardwood and bounced — some hung from or stood on the rim — while suspended in disbelief as a hallmark moment in the young Kevin Willard era graced the Xfinity Center floor.

A special game for Maryland led into an energetic run that took down the Terps’ first AP top-five opponent since 2016. Maryland was previously 6-34 against AP top-10 teams since 2010 and notched its largest win over a top-five opponent since 2003.

Willard said he saw the upset coming.

“[Assistant coach] Grant Billmeier and I were in early this morning watching film and I said to him, ‘there’s no doubt we’re going to win this game’,” Willard said.

“These kids have worked extremely hard, when we have played bad they’ve had a great attitude … we had three good days of practice this week, so I knew we were going to win, it was not a surprise for me.”

[Second-half surge lifts Maryland men’s basketball to upset No. 3 Purdue, 68-54]

In certain ways, Maryland’s upset over Purdue wasn’t all surprising. Betting lines skewed towards the unranked Terps closer to tipoff and Maryland remains undefeated against conference opponents at home, now 14-1 on the year overall.

When the Terps faced off against Purdue last, they almost knocked them off on the road and largely nullified the Boilermakers’ offensive production. Like Maryland, Purdue had only lost one game at home all season, yet the Terps took them to a wire.

The close road game served as foreshadowing for a unique night in College Park.

“It’s really hard to win on the road,” Purdue coach Matt Painter said. “You got to be about 10, 12 points better than your opponent, and we were not that tonight.”

Purdue wasn’t close to that. Zach Edey produced under his averages in points and rebounds while the Boilermakers could only manage a three-pointer and a free throw during the about eight-minute stretch of the second half that encompassed Maryland’s 29-4 run.

Coming out of half, the Boilermakers jumped out to an eight-point lead before the Terps shut them down and ran away with the game.

[Maryland men’s basketball locked down Jalen Pickett in win over Penn State]

“When you walk in here and nobody is for you, that’s a beautiful thing,” Painter said. “The thing that you want to do is hear the silence at the end instead of those cheers … they kicked our ass and they kicked our ass on the court storm.”

A large part of the 29-4 run proved to be the raucous energy in Xfinity Center. When Patrick Emilien threw down a dunk and Ian Martinez executed a spectacular three-point play during the scoring streak, it felt as if the cheers went nuclear.

And all that energy had to go somewhere. With Maryland victorious, students wasted no time sprinting across the court in triumph.

“The court storming was for the students, for the fans,” Willard said. “The locker room is what it’s all about. It was great, I told them I was very proud of them, I told them that they earned it, they’ve worked hard.”

One of Maryland’s largest challenges in the Willard era led to a celebration reminiscent of the Terps regular-season Big Ten championship, according to Hakim Hart.

Students dogpiled, players mingled with fans and the Terps waded into rare waters with a memorable top-five upset of a Big Ten rival.