LOUISVILLE, Ky. -- In the midst of a season on the verge of spinning out of control, Louisville coach Rick Pitino told enigmatic point guard Edgar Sosa maybe it would be best if the talented but troubled junior got a fresh start somewhere else.
Sosa told Pitino he just needed one more last chance in a career full of last chances. On Sunday, he backed it up with the biggest shot of his life.
Sosa's 25-footer with 2.8 seconds remaining lifted the 18th-ranked Cardinals to a 74-71 victory over archrival Kentucky and lifted the weight of great expectations off Sosa's slender shoulders.
"I know that I can play this game and I know of the things I'm capable of doing on the court," Sosa said after scoring a season-high 18 points. "Many people may think that 'Sosa don't got it no more' or that freshman year was just a fluke. But I know what I can do. It hasn't shown in the first half of the season, but hopefully it'll show in the second half."
It's a second half that suddenly looks full of possibility for the Cardinals (9-3), one of the nation's biggest early season disappointments after losses to Western Kentucky, Minnesota and UNLV sent them tumbling from their lofty No. 3 preseason ranking.
Kentucky (11-4) nearly sent the Cardinals out of the polls entirely after a miraculous rally in the final 51 seconds.
Louisville seemed in control after Sosa made two free throws to give the Cardinals a 71-64 lead.
The Cardinals inbounded to Sosa, who dribbled calmly over halfcourt and waited for the clock to wind down. When it got to 6 seconds, he took two dribbles toward the basket and pulled up over Kentucky's Michael Porter. The shot was good all the way as Freedom Hall erupted.
Porter's last-second heave from 40 feet was off the mark, letting Louisville escape with its first home win over the Wildcats since 2002.
"I knew Sosa wasn't going to pass it," Kentucky coach Billy Gillispie said. "When you think about the entire possession and you get your choice of a 24-foot shot with no passes, you take your chances."
It's a chance Gillispie had seen before. Sosa missed a last-second 3-pointer against Texas A&M -- coached by Gillispie at the time -- in the second round of the NCAA tournament two years ago.
Sosa, a freshman at the time, rushed the shot and missed badly. He didn't make the same mistake twice.
"You've got to give him credit for making a shot like that after all he has gone through," Louisville guard Jerry Smith said. "Nobody deserved to make it any more than he did."
Pitino walked up to a group of reporters surrounding Sosa after the game and laughed while asking why Sosa suddenly became so popular.
"I am really happy for Edgar because it's been very difficult on him and he got an opportunity to be a hero, which he was," Pitino said.
It's a scene that seemed unlikely after Sosa played his way into Pitino's doghouse over the last two seasons. The bottom came on New Year's Day, hours after Sosa had two points and four turnovers in a loss to the Runnin' Rebels.
Pitino suggested that maybe Sosa would be better off playing somewhere else. Sosa, who committed to Louisville without even seeing the campus, decided to stay because "there's no place else I'd rather be."
Meeks led the Wildcats with 28 points and Patrick Patterson added 22 points and 15 rebounds, but Kentucky had its six-game winning streak snapped thanks to a familiar culprit: turnovers. The Wildcats, who were averaging 18.2 turnovers a game, gave it away 21 times, including six by Meeks.
"I felt like it was kind of my fault the way we started," Meeks said. "But I thought we showed good composure coming back. Coach Gillispie told us during the timeouts that the game was far from over. They got up 10, 12, but this team has never lacked confidence. We feel like we're always going to win the game."
The Cardinals used a 12-0 run, including a three-point play by Sosa, to go ahead 54-43. Williams hit a 3-pointer moments later to push it to 57-45 with 13:06 left.
Williams finished with 19 points and eight rebounds, Smith had 11 points, two assists and two blocks and Earl Clark added 10 points and eight rebounds as the Cardinals used their depth to offset Kentucky's two stars.
Patterson dominated his matchup with Louisville freshman center Samardo Samuels, who managed four points and a rebound in 11 foul-plagued minutes.
The Wildcats, however, were hardly taking solace in getting close. They were hoping a win over the Cardinals would signify their rise in Gillispie's second year. It'll have to wait until Southeastern Conference play starts on Saturday against Vanderbilt.
"There's no moral victories for us," Porter said. "Just because we came close that doesn't mean anything to us. It was hard, he made a really tough shot. What can you do really?"
College basketball realignment tracker: Keeping track of NCAA Division I conference changes
More than half of college basketball's 32 Division I conferences have pending membership changes. We're tracking them all.
Alabama Crimson Tide men's basketball adds former St. Bonaventure Bonnies guard Dominick Welch
Alabama has signed former St. Bonaventure shooting guard Dominick Welch.
Sources: Michigan men's basketball coach Juwan Howard declines Los Angeles Lakers' interest
Former NBA assistant and current Michigan coach Juwan Howard declined an overture made by the Lakers to be a candidate for the team's coaching job, sources told ESPN's Adrian Wojnarowski.