Alex Len (game-high 23 points), left, Jake Layman, right, and Maryland take third-ranked Kentucky down to the wire at the Barclays Center in Brooklyn. (Jason Decrow/Associated Press)

Rap music blared with Jay-Z courtside at Brooklyn’s Barclays Center, the jet-black arena with the Mobius strip facade where ESPN cameras set up shop to watch the defending NCAA champion play on a parquet NBA floor, with the Maryland men’s basketball team as a mere side act to the show. And with a double-digit lead at halftime, Kentucky appeared primed for a blowout to open its title defense.

But these Terrapins, spurred by youth and reinvigorated with a fresh start after an abysmal opening 20 minutes of shooting, clawed back with a 13-0 run that sent the contingent of College Park faithful swooning for an upset of the third-ranked Wildcats. Ultimately, however, Kentucky hit the necessary free throws down the stretch, barely escaping with a 72-69 win that demonstrated plenty about the resiliency of Coach Mark Turgeon’s bunch.

A reloaded Kentucky team, which lost six players in June’s NBA draft, turned to a thin bench to help bring the lead back to 68-63, before a Charles Mitchell tip-in cut it to 68-65 with less than two minutes remaining. After corralling a defensive rebound, Dez Wells, two days removed from being declared eligible for the season after transferring from Xavier in August, went coast-to-coast, taking a hard spill by a television cameraman. With Mitchell in his ear, telling him, “We need you now,” Wells missed the second of two free throws that kept the Terps down 68-66.

On the other end after the miss, Mitchell committed an ill-advised foul of Kyle Wiltjer (team-high 19 points), who drilled both of his free throws to put the Wildcats up by four points. But Alex Len, who picked a perfect occasion for a national coming-out party, came crashing into the lane, following up his own missed free throw with an easy lay-in that cut the deficit to 70-69. Jarrod Polson, who scored 10 points off the bench for the Wildcats, stepped up to drain both of his attempts.

The game’s final possession in their hands, with shooters inserted across the floor, the Terps inbounded to Pe’Shon Howard, who weaved up the court and had Jake Layman open after a bone-crushing screen, but couldn’t he couldn’t get an attempt off in time.

It was a heartbreaking end to a furious and perhaps surprising rally for Turgeon’s squad. With less than 16 minutes left in the game, Wells cocked back and whiffed on a dunk, but wound up in the secodn row of courtside seats chasing a loose ball. On the sideline, Turgeon bounded into the air in excitement and pumped his fists. James Padgett, meanwhile, drew a foul in the paint, stepped to the line and calmly drained two free throws that cut the Kentucky lead to single digits for the first time since early in the first half.

With Len resting on the bench, Layman canned a corner three-pointer that chopped the lead to 53-51 minutes later. The chants of “Let’s Go Maryland” grew louder, ricocheting throughout the arena as Seth Allen drained two three-pointers that gave the Terps their first lead since 15 minutes 23 seconds remained in the first half.

Considered by Turgeon to be timid offensively throughout his freshman season at Maryland, Len asserted himself in the post as the first half wound down, preventing the Terps’ deficit from growing larger with an array of hooks and dunks, even swishing an 18-footer from the left wing. Flashing improved strength and confidence, Len put on a show for the national audience, finishing the game with 23 points and 12 rebounds.

His teammates, however, lagged behind early. Maryland missed all 11 of its three-point attempts in the first half, while Nick Faust and Dez Wells were a combined 4 for 19 from the field by the break and the Terps received zero bench points.

Maryland made just a third of its shots on the evening, and finished 3 of 19 from beyond the arc. Nick Faust and James Padgett scored 11 and 10 points, respectively, while Wells chipped in 10.