About a minute into the second half, Maryland men’s basketball forward Bruno Fernando rushed to the corner to defend Virginia guard Kyle Guy, forcing him to hesitate and pump-fake on a potential three-point shot.

It was the Terps’ best attempt at perimeter defense to that point, after the Cavaliers shot 8-of-16 from beyond the arc in the first half. Guy had already hit four triples and showed no signs of cooling down.

Rather than passing, Guy faded away and splashed his fifth three of the night in Fernando’s face, increasing Virginia’s edge to 42-30 and prompting another sigh from the sellout crowd of 17,950 at Xfinity Center.

But coach Mark Turgeon’s squad — which started four underclassmen against the No. 4 team in the country — didn’t fold. With the game threatening to get out of hand in the second half, Maryland fought back and forced the Cavaliers to sweat out a 76-71 loss.

The first defeat of the season nevertheless came with optimistic undertones for the young Terps.

“We’re going to be one hell of a team come March,” freshman guard Eric Ayala said. “For us to go out there and play the way we did and fight back, that shows a lot of character in our team.”

[Read more: No. 24 Maryland men’s basketball falls 76-71 to No. 4 Virginia]

Virginia has five upperclassmen on its roster, and all get significant playing time. Maryland has five upperclassmen as well, but only guard Anthony Cowan is a major contributor, and he had a down game Wednesday.

The Cavaliers, a perennial NCAA tournament team, showcased that advantage in building an eight-point halftime lead. Guy and guard Ty Jerome, both juniors, punished Maryland’s soft three-point defense in the first half, combining for 23 points on 6-for-11 shooting from deep.

Ayala said he noticed Virginia’s maturity most in its two turnovers the entire game, both of which were offensive fouls. The Terps coughed the ball up 14 times, the final one coming with 37 seconds left to seal their fate.

“They’ve been together for too long,” Fernando said. “They made a lot of great plays. We’re still trying to figure out things for ourselves.”

If Maryland figured out one thing Wednesday night, though, it was that a young team refused to quit when it had the opportunity to down 17 points. With Cowan, the team’s elder statesman, in the midst of a 5-of-12 shooting performance, the freshmen never folded.

Ayala and freshman guard Aaron Wiggins combined for eight points in the first half, both playing in front of a raucous crowd for the first time in their college careers.

“Aaron was really nervous in the first half and he’ll probably admit to that,” Turgeon said. “But I thought the second half, he played with much more poise and made some shots.”

After settling into the magnitude of the game, Wiggins matched Ayala with 13 points, as they combined for six 3-pointers to lead a spirited second-half comeback attempt.

Maryland dwindled the Virginia lead down to four with four minutes remaining, and while the Cavaliers ultimately pulled away after Cowan fouled out with 30 second remaining, Turgeon was pleased with his squad’s effort.

“That’s a really good sign for us, it really is,” Turgeon said. “It’s hard to come back on Virginia, and we were able to do it.”

Turgeon found solace in his team’s 54 percent field goal rate and 35-23 rebounding advantage. Maryland became just the second team since the start of last season to surpass 70 points against the Cavaliers.

But unlike UMBC in March, the Terps couldn’t pull off the upset. It was an opportunity missed for a marquee win before conference play begins Saturday against Penn State.

Still, the final score was just a five-point difference, a sign that Maryland didn’t — and isn’t going to — shy away from its youth.

“Every game we’re probably going to be the youngest team out there,” Ayala said. “So we have to go out there and play to the best of our abilities.”