The junior guard hit a long, pull-up three-pointer with 2.3 seconds left to give Louisville a 74-71 win over Kentucky in front of 20,078 fans at Freedom Hall.
With Wildcat guard Michael Porter guarding him as the clock ticked down Sosa waved off a screen from Will Scott, dribbled to the middle of the floor and pulled up for a 28-foot three.
"He kept on backing up, backing up, almost daring me to shoot, so I just decided to let it fly," Sosa said. "Then I followed through, kept my hand in the cookie jar."
The resulting basket sent a jar through Freedom Hall as Cardinal fans celebrated UofL's first homecourt win over its archrival since December 2002.
Terrence Williams scored 19 points, grabbed eight rebounds and recorded five steals for the 18th- ranked Cardinals (9-3), while Sosa scored a season -high 18 points.
Afterward UofL coach Rick Pitino praised Sosa, who has often been criticized by his coach and fans alike in his two-plus years with the Cards, who came in averaging just five points and 1.1 assists per game.
"I'm very happy for Edgar Sosa," Pitino said. "It's been very difficult for him, this was a chance for him to a be a hero, and he was."
Sosa, who had played sparingly in UofL's last two games (13 minutes vs. UNLV and six against UAB), responded to his fifth start of the season with 18 points. That came after he had a heart-to-heart with his coach on New Year's Day.
"We had a long talk and I basically told him, 'Edgar if I was you I'd transfer now. I wouldn't wait because you're going to need a year under another coach to learn his system,'" Pitino said. "'The fans aren't too happy with you, more importantly you're not happy with yourself, you're not having fun. I really think we'll look at some schools that don't play defense, there aren't too many, but there are a few I can pick out. Then, we'll get you to transfer. I want you to think it over son, if you decide to come back I'm going to start you, but I want you to be happy and have fun playing the game of basketball. It's painful watching you.
"He said, 'Coach I feel like I'm on a short leash, everyone else is on a long lease and I am on a short one. I said, 'Edgar the reason you are on a short leash is because every time you miss a shot you get so down on yourself. I feel that you're not an upbeat, positive guy. All I want you to do is play defense. I don't care what else you do, but play defense.' (And) he decided to stay and I am happy he made that choice.'"
UofL fans likely are too, as the Cards bounced back from their New Year's Eve loss to UNLV.
UofL jumped out to a quick 13-4 lead thanks to a 9 -0 run in which Sosa scored five points and Earl Clark four.
But the Cards could never shake the Wildcats (11- 4), who got 28 points from junior guard Jodie Meeks and 22 points and 15 rebounds from sophomore forward Patrick Patterson.
Back-to-back three-pointers by Meeks pulled UK within 17-16 at the 11:51 mark, and the two teams stayed close the rest of the half.
UofL led 38-35 at intermission thanks to nine points apiece from Sosa and Clark and a 13-6 advantage in points off of turnovers, and in spite of being outrebounded 19-9 and only five minutes, two points and two fouls from center Samardo Samuels.
UK took its first, and only, lead on a Patterson rebound basket 2:44 into the second half. But right after the field goal UK coach Billy Gillispie was whistled for a technical foul.
That started a 12-0 run by the Cards. T-Will's three with 13:06 to play gave UofL its largest lead - 57-45.
The Wildcats, though, wouldn't go away. They used an 11-2 spurt to pull within 66-64 with 2:54 to go.
UofL led 71-64 with 50.7 seconds to play after two free throws by Sosa, but the Cards nearly choked the game away. Meeks hit three free throws, after being fouled on a three-point attempt, scored on the heels of a steal, then hit two more free throws after another UofL turnover to tie the game at 71 with 22.9 seconds remaining.
That set the stage for Sosa.
"I knew Sosa wasn't going to pass it," Gillispie said. "I don't mean that bad, he killed us when we played him two years ago (when Gillispie was at Texas A&M). He wanted to take the last shot and that's why he probably made it. You know when you think about the entire possession, if you would settle for a 24-foot jumper with no pass you would take your chances. If Mike would've gotten too much closer he would've tried to drive. But that wasn't the story of the game, he made the big play to end the game, but that wasn't the story of the game."
"I'm really happy for Edgar Sosa, he's gone through some difficult times," Pitino said. "It's nice for a young man to hang tough and get rewarded for it."
Jerry Smith added 11 points and Clark tallied 10 and eight rebounds for the Cards, who got little from Samuels (four points, four fouls, one rebounds in 11 minutes).
UofL did, though, get some valuable minutes from fellow freshman center George Goode, who Pitino said afterward is playing with a stress fracture and hadn't practiced in "three or four days." Goode didn't score, but had two assists, two blocks and one steal in 22 minutes for the Cards, who shot 55 percent (11 of 20) from three-point range.
UofL next plays at South Florida at 7 p.m. Wednesday.