In spite of everything the 25th-ranked Wildcats won Tuesday night, an outcome that was beginning to look doubtful.
Julius Randle had 12 points and 11 rebounds and Kentucky rallied past the Crimson Tide 55-48 to end a two-game losing streak.
Needing a bounce after Saturday's loss at South Carolina and with a huge hurdle looming this weekend at No. 1 Florida, the Wildcats (22-8, 12-5 Southeastern Conference) used a 15-2 second-half run to build a 43-34 lead. They added several smaller runs to hold off the stubborn Crimson Tide (12-18, 6-11) in their regular-season home finale.
Kentucky avoided its first three-game losing streak under coach John Calipari and clinched second place in the conference.
It wasn't easy or pretty for the Wildcats, whose 33 percent shooting (16 of 49) reflected their generally tentative play against the Crimson Tide's zone defense. But a couple of timely dunks by Dakari Johnson and 3-pointers by Aaron and Andrew Harrison keyed the run that helped put away Alabama.
"We shot (33) percent for the game and won. I'm happy," Calipari said. "We're still not all the way back. Guys were really tentative."
Trevor Releford had 13 points for Alabama.
Johnson made all four of his shots and had nine points with five rebounds. James Young also had nine points for Kentucky despite 1-of-11 shooting.
To Johnson, the ones he and his teammates made were all that mattered.
"We felt like we just needed to get back on that path of just winning," Johnson said. "Just the feeling of how it feels to win and I think it is a good start for us. Hopefully, we can just carry it on."
The Wildcats outrebounded Alabama 41-27 -- including a 15-6 advantage on the offensive end -- and made 18 of 24 free throws in the home finale for seniors Jarrod Polson and Jon Hood, members of the 2012 NCAA championship team.
They both contributed 3-pointers to start the game for Kentucky and chipped in valuable minutes that helped shake the Wildcats from their funk.
Alabama shot just 33 percent in the second half and 38 percent overall.
"I thought they did a really good job of attacking and taking care of our mistakes," Alabama coach Anthony Grant said, "especially in the (second) half taking away some momentum, getting energy back in the building and just benefiting off of those type of plays."
Though rough at times, Kentucky's win temporarily quelled anxiety among its fervent fan base over the late swoon. Certainly, there was cause for concern following Saturday's loss in which the Wildcats had to rally from a 16-point second-half deficit with Calipari in the locker room after being ejected.
And though Kentucky faced an Alabama squad that had won just three of its last 10 coming in, the Crimson Tide's 73-57 win over rival Auburn on Saturday symbolized what can happen when everything is working. Levi Randolph's 24 points led the way and the junior guard had scored 70 points in his last three games. He had eight points Tuesday night.
However, SEC player of the year candidate Releford provided the Crimson Tide's spark in a low-scoring first half by recording nine of their first 13 points to quiet cheers for fan favorites Hood and Polson.
The Wildcats regrouped to take a 21-20 lead on a free throw by Willie Cauley-Stein, an aspect that helped them trail just 28-25 at halftime despite 6-of-25 shooting. Kentucky took 15 free throws, three times as many as Alabama, making 11.
Then came the energy and ball movement Calipari had waited for all game from his players, just as they seemed resigned to just stay close. Trailing 32-28, Randle made consecutive baskets, the Harrisons added consecutive 3-pointers and Johnson sandwiched dunks around a free throw by Young.
The big run over 4:57 provided Kentucky's biggest lead at 43-34. Alabama got within 48-47 on Randolph's jumper with 5:11 left but only added a free throw by Releford after that.