"This is one of my favorite wins of the year," said Pitino, whose team had won its last eight games by an average of nearly 30 points. "UAB is a very tough-minded team, and this environment was difficult for us.
"I'm very proud that we could withstand all this."
Francisco Garcia and Juan Palacios both hit two free throws in the final 34 seconds for the Cardinals (20-3, 8-1 Conference USA) and Garcia also had a key block. Louisville stayed atop the league standings this week with wins over two of its top challengers, Cincinnati and the Blazers.
Demario Eddins gave UAB (16-6, 6-3) a 71-70 lead by making one of two free throws with 1:44 left, then Louisville's stars took over.
Larry O'Bannon hit a 3-pointer from the top of the key and finished with 21 points. Then Garcia was fouled on a 3-point attempt and hit two of three from the line with 34 seconds left for a 75-73 lead.
He blocked a shot by Eddins on the other end and a long scramble for the ball ended with a jump ball that gave Louisville possession. Palacios put the game away with two free throws with 8 seconds left.
"The game was there to be taken, but we couldn't finish it off," Blazers coach Mike Anderson said. "I think the whole nation got a chance to see what UAB basketball is all about."
Garcia had 19 points and played the final 3:25 with four fouls. Palacios added 10 points and the Cardinals made 19 of 21 free throws.
The Blazers missed all eight of their 3-point attempts in the second half for their fourth straight loss in the series. Forward Marques Lewis picked up his fourth foul less than 6 minutes into the second half, and UAB wasn't as effective with him sidelined.
"When he was in there, they had to respect everybody in the game for us," said Eddins, who scored 18 points. "When he was out, they were able to concentrate on our shooters."
Donell Taylor had 16 points and his twin brother, Ronell, added 11 for UAB, combining on an alley oop in the second half.
The Blazers led 45-43 at halftime but trailed most of the way after that with Louisville opening the second half on an 11-2 run. The Cardinals could never push their lead past seven points in the half, though, and Eddins hit one of two free throws after getting fouled by Garcia with 3:25 left to tie it 70-all.
UAB, which leads the nation in steals, forced a modest 14 turnovers and never rattled the Cardinals.
"We hung in there and executed at the end," Pitino said. "When you're on the road and turn it over only 14 times, you're mentally tough. We're a veteran team and we played mentally tough tonight."
The matchup of the league's top scoring teams lived up to its billing in the first half, with UAB taking a 45-43 lead on a layup by Brandon Tobias with 6 seconds left off a pass from Squeaky Johnson.
The Blazers trailed by as many as 10 points in the first half but closed on a 19-7 run and shot 55 percent. They hit only 40 percent after that.
The game drew 9,354 fans, a Bartow Arena record.