(Associated Press)

After the celebration had ended, Evan Smotrycz thought about the way in which the Maryland men’s basketball team had beaten Miami and exhaled in relief. “Uh,” he said, “my legs got really heavy. Being up whatever we were, to go into overtime would have been tough.”

Jake Layman felt something similar. His muscles were barking by the final buzzer and the prospect of playing any longer seemed impossible. Every ounce of energy had been sucked from the Terrapins during their late collapse, which seemed all too familiar after the letdowns they had suffered this season. “Please don’t let this go into overtime,” the sophomore forward silently prayed. “I’m getting tired.”

Though Dez Wells ultimately bailed everyone out with his game-winning three-pointer, Maryland’s once-comfortable lead dwindling into a tie score was enough cause for concern. But at this juncture in the season, sunk below .500 in conference play, the Terps needed a victory, and if their hearts thumped through their chests along the way during the 74-71 decision, then so be it.

“Yeah, it’s huge,” Coach Mark Turgeon said, and Layman called Wednesday night a “must-win game,” because four losses since Jan. 6 had made it so. Yes, the Terps reveled as they sprinted into the locker room, slapping hands with anyone who dangled into the tunnel, but by the time they entered the media room, everyone seemed thankful that another one hadn’t sneaked away.

“A win is a win, regardless of whether it’s pretty or whether it’s ugly,” said Wells, whose team-high 21 points all came in the second half. “Wins are hard to come by in such a tough league like this and I’m just happy we got one.”

The season may yet be salvaged and Wells’s shot might be the impetus for that, but the road ahead gets far tougher and the players know it. Perhaps that’s why, in a season filled with quotes about “next-game mentality,” the Terps finally allowed themselves to reflect upon the minor milestone of moving back to average.

“It’s a huge confidence booster for us,” Layman said. “We were a little down coming into this game, but we know the fight’s not over. We’re feeling good right now.”

Odds are the Terps will feel good come Saturday, when they visit a hapless Virginia Tech (8-12, 1-7 ACC) team that recently lost to Boston College in a 76-52, defense-optional nightmare. After that, though, the road gets tougher. They visit North Carolina (13-7, 3-4 ACC), no small task even in light of the Tar Heels’ struggles. Then Florida State (13-7, 4-4 ACC), blowout winner over Maryland in Tallahassee earlier this month, arrives on Feb. 8. After that comes road games at Virginia (16-5, 7-1 ACC) and Duke (17-4, 6-2 ACC), ranked second and tied for third, respectively, in league standings.

Though Wells salvaged what would have been another demoralizing defeat, there were plenty of positives to extract, even if it came against Miami (10-10, 2-6 ACC). The offense, suddenly, had movement, enough to break the Hurricanes from the matchup zone, no small feat in itself, and it became the first ACC team to top 70 points against Coach Jim Larranaga’s swarming scheme. Seth Allen unveiled the athleticism that had been lacking since his return from a broken foot, twice scoring on acrobatic scoop layups with his dominant left hand. Layman was more assertive, evidenced by his 15 points on a season-high 15 shots.

But everything began to unravel yet again. Up 10 after two Wells free throws with 1 minute 45 seconds left, Layman fouled Rion Brown on the next possession. Then Wells and Allen both committed turnovers. Then Faust fouled Brown on a three-pointer, and he made all three free throws. Suddenly Allen, who had sent Comcast Center into a court-storming frenzy with his success from the stripe against Duke last season, missed the front end of two one-and-ones, and in between Garrius Adams hit a layup and Brown tied the score with a three-pointer.

Removed those last several possessions, Wells said, and it was a perfect second half. But as it stood, the junior guard gave Maryland exactly what it craved.

“It seems like the game that we needed to get out of a little funk,” said Smotrycz, who also had 15 points and is shooting 70 percent on three-pointers over the past three games. “Everything that could go wrong went wrong down the stretch. I think that’s a vote of confidence for us going into this next part of the ACC.”