Evan Smotrycz (15 points, three three-pointers) and Maryland nearly let one slip away at Comcast Center before Dez Wells saved the night against Miami. (Ricky Carioti/The Washington Post)

Here came Dez Wells, hero in a white Maryland jersey, patiently dribbling, waiting for his moment. He had walked into Comcast Center two hours before tip-off Wednesday night against Miami and worked through the same pregame routine as usual, so in situations like these he could shake the pressure and smile.

“He’s our superstar,” forward Jake Layman would say later, and the Terrapins wanted no one else with the basketball when they needed saving.

The collapse had been sloppy, a 10-point lead gone in less than two minutes amid a swirl of mistakes and missed free throws. The score was tied as the clock ticked toward the final seconds of regulation. Wells idled near midcourt. Opposite him crouched Miami guard Garrius Adams, a friend from back home in North Carolina. Forward Evan Smotrycz dashed up to set a screen, then broke away. It was a decoy, part of the plan, but Wells waved him off anyway with a swift flick of the wrist.

The junior guard stepped to the top of the key and launched a three-pointer that found only the bottom of the net with 5.9 seconds left, lifting Maryland to a wild 74-71 win.

Wells finished with 21 points, all in the second half — when he made all seven of his shots — and he exited to a standing ovation, high-fiving his way through the tunnel and into the locker room.

“I’ve taken those shots a million times since this preseason,” Wells said. “A million times. I just feel comfortable shooting it.”

An eerily similar situation unfolded in October. It was a preseason scrimmage with Villanova. Then, too, the Terps collapsed late before Wells hit the game-winner from almost the exact same spot. But he had never won a game in this manner before, at least not one that counted.

With four losses in its past five games, each one increasing the ire among fans and players alike, Maryland faced a paradox. A season already filled with so much disappointment needed to be turned around fast, and yet the Terps were preaching patience to beat Miami’s methodical ways. Every player wanted to find the fix, so how would they handle slowing down and hoping the answers came to them?

As it turned out, Wells provided the resolution. He spent the first half sitting on the bench, saddled by foul trouble, as Smotrycz (15 points) and Layman (15 points) provided much of the offense. Upon returning in the second half, Wells became a one-man wrecking crew. But after Miami guard Rion Brown (game-high 25 points) made seven free throws and a three-pointer in the final 2 minutes 9 seconds, the game was tied, setting up Wells’s heroics

“Just a big-time shot,” Smotrycz said. “I had a feeling that was going in.”

When Maryland went up 43-35 in the second half, the biggest lead for either team to that point, Miami Coach Jim Larranaga was forced to call his first timeout with 16 minutes left. Soon the Hurricanes, as they did four days earlier against No. 2 Syracuse, began chipping away. A 10-2 Miami run, capped off by a three-pointer from freshman guard Davon Reed, tied the game at 50-50.

At that point, Wells took over. As he avoided foul trouble, the Hurricanes, like many teams before, had no answer when he careened toward the rim.

It had been weeks since things in College Park looked that good.