LEXINGTON, Ky. — When the Kentucky Wildcats absolutely had to have a 3-point shot down the stretch of a game that turned unexpectedly tight in the second half, they hit them.

Alabama, which needs 3-pointers at a higher clip for the entire game to power its offense, didn’t.

The result was that UK managed to hold Alabama’s second-half run and take a 76-67 victory on Saturday at Rupp Arena.

Despite the final nine-point margin, Alabama made the crowd of 24,000 nervous in the final minutes, cutting what had been a 15-point UK lead with 17 minutes to go down to three points when John Petty scored on a goaltending call with 2:03 to play, pulling Alabama to within a single possession, 70-67.

Kentucky’s Nick Richards scored one free throw on the ensuing Wildcat trip. Alabama got the ball inside to Javian Davis on its possession but he missed from close range in thick traffic (so thick that Alabama coach Nate Oats protested loudly to the officials.)

The Wildcats’ Immanuel Quickley then hit the dagger with a 3-pointer off an inbounds play with 58 seconds remaining. Petty missed a 3-pointer at the other end and UK iced the game with two Quickley free throws.

The Crimson Tide, meanwhile, had its worst shooting day of the year, attributable in part to tenacious UK defense. The final total of four 3-pointers were the fewest by Alabama in a game this season and the 19 percent (4-for-21) from beyond the arc was also a season-low for the Crimson Tide.

“They play hard,” Alabama coach Nate Oats said. “They’ve got length, they make it hard to shoot. They are long and athletic and that’s hard to replicate in practice.

“They did as good as a job on us defensively as anyone has done all year. I don’t know how you replicate that in practice, or Nate Richards at the rim. He blocked five shots. The only way we duplicate that in practice is to use broomsticks, I guess.

“Their game plan was to keep us from shooting 3’s and they executed that plan just about to perfection. Our plan was to take away what they get at the rim. When you do that, you give up some threes and they made the shots so credit to them.”

Alabama started slowly, missing its first six 3-pointers, then struggled at the end of the first half as well, trailing 45-35 at halftime.

But the Crimson Tide slowly chipped away at the lead, pulling within four points, 61-57, on a Petty tip-in with just under seven minutes to go.

Quickley was the hero for UK, scoring a game-high 19 points on 5-of-6 3-pointers. Asked after the game about his hot shooting, Quickley replied that he was “steaming hot.”

“Touch me and you might burned,” he added.

Herb Jones led Alabama with 18 points, taking a career-high 20 shots. Petty added 16 for the Crimson Tide.

Alabama (8-7, 1-2 SEC) will be back in action on Wednesday, hosting Auburn.

Reach Cecil Hurt at cecil@tidesports.com or via Twitter @cecilhurt