LEXINGTON, Ky. (AP) Stringing baskets together was only half the challenge for Kentucky, which also had to counter-punch its way past Mississippi.
The lead traded hands nine times in the final five minutes before Nick Richards ultimately gave the No. 12 Wildcats the needed edge at the foul line.
Richards had 16 points, including two go-ahead free throws with 1:11 remaining, and Immanuel Quickley and Keion Brooks Jr. each made two more in the closing seconds to help No. 12 Kentucky escape against Mississippi 67-62 on Saturday.
The Wildcats (20-5, 10-2 Southeastern Conference) shot just 39% overall but made 48% in the second half to erase a seven-point deficit and create a back-and-forth game for the final eight minutes. Richards followed two free throws with 2:11 left with two more a minute later to put Kentucky up 63-62.
''It shows that we have a winning mentality, a will to win,'' said Richards, who overcame a slow start to finish 6 of 10 from the field with seven rebounds. ''I wasn't my best in the first half and in the post. I wasn't really my best the entire game, but we still came out and found a way to win.''
Kentucky needed a gutsy dive and scramble by EJ Montgomery for a loose ball that he eventually fed to Tyrese Maxey for a go-ahead layup. Free throws certainly helped the Wildcats, especially with the Rebels answering with a clutch basket of their own and poised for one more.
And that's where Ole Miss fell short with its final chances.
Breein Tyree missed the first of a 1-and-1, but Maxey's turnover gave the Rebels the ball with 29.8 seconds left. Devontae Shuler dribbled time off the clock but airballed a 3-pointer out of bounds with nine seconds left.
''It sure didn't look right,'' Ole Miss coach Kermit Davis said. ''We wanted to run a little stack play and take some time off the clock. I really didn't care who took it (the shot). There were 8 or 9 seconds left on the clock. I would have liked for them to have reset it.''
Quickley, who had 17 points, was fouled a few seconds later and added two from the line with 6.6 left before Brooks sealed the win with two more.
''This was a rock fight and a great win,'' Kentucky coach John Calipari said.
Maxey had 14 points while Montgomery had eight rebounds as Kentucky beat the Rebels 41-33 on the glass.
Breein Tyree had 19 points, while Blake Hinson and KJ Buffen each had 13 for Ole Miss (13-12, 4-8), which had won three in a row. The Rebels dropped their 11th consecutive series game to the Wildcats.
Montgomery had four fouls when he dove on the floor in a scrum for Maxey's missed 3-pointer. Somehow he came up with the ball and found Maxey for a critical layup with 1:21 left.
''He works hard on the offensive glass,'' Maxey said of Montgomery. ''He's very important to this team and came up with one of the biggest (plays) of the game. He got it out to me, and I just tried t make a play.''
Ole Miss: The Rebels shot just 37% before halftime but were lifted by several 3s from Tyree, who had averaged 33.7 points the past three games. The Rebels tried to dribble down for the final shot, but Shuler missed badly from deep and late fouls put Kentucky on the line. They finished 6 of 17 from long range. Davis also received a technical foul early in the second half.
Kentucky: Missed shots hurt the Wildcats in the first half as they went 1 of 13 from deep and 9 of 30 overall (30%). They made just 2 of 22 from long range, but worked the ball inside the arc and especially to the lane, drawing fouls and converting 19 of 24. Quickley's second-half 3 was huge, helping Kentucky's 7-0 spurt that eventually tied the game at 47.
Mississippi: Visits Missouri in the first of two meetings over 15 days. The Rebels host the Tigers on March 4.
Kentucky: Visits LSU on Tuesday with a one-game lead on the Tigers for the SEC lead.
More AP college basketball: https://apnews.com/Collegebasketball and https://twitter.com/AP-Top25