Updated

Kentucky coach John Calipari was ejected from Saturday night's game and didn't talk to reporters after South Carolina beat the 17th-ranked Wildcats 72-67.

His team left him plenty of things to think about, though.

The Wildcats (21-8, 11-5 Southeastern Conference) did cut a 16-point deficit to one after Calipari's second technical midway through the second half. But they were plagued by the same poor shot selection in the final 3 minutes and couldn't overtake the Gamecocks (11-18, 4-12).

It was Kentucky that looked like the team in the league basement, missing 14 straight shots and shooting under 27 percent from the field.

"That's a hurting locker room right now," said assistant John Robic, who took over for Calipari after he walked out of the arena with his suit coat buttoned but his shirttail out.

Calipari's ejection marked a turning point in a terrible game for Kentucky. After he left, the Wildcats responded with a 28-17 run.

"It was just another obstacle to overcome. We huddled and said we've got to do what we've got to do," Aaron Harrison said.

But the Wildcats didn't do enough. Robic put some of the blame on himself, wishing he had saved a timeout or two to help his young team get better shots at the end.

"I haven't been a head coach in nine years, hadn't been on the floor like that. I probably should have saved one. That's why I got fired, too," said Robic, who was last a head coach with Youngstown State in 2005.

It was South Carolina's first win over a Top 25 team in more than three years and it pulled the Gamecocks out of last place in the SEC. Students ignored repeated warnings and stormed the court after the final buzzer, likely incurring a hefty fine from the league.

It also was South Carolina's first win over Kentucky since beating the No. 1 Wildcats 68-62 in January 2010 in Calipari's first game against the Gamecocks. That was the last time South Carolina students stormed the court, and freshman Sindarius Thornwell remembered watching that one on TV.

"It's like a movie. You always as a basketball player playing in college dream of upsetting somebody and have the crowd storm the court," he said.

Thornwell hit two key free throws with 20 seconds left after a three-point play by Julius Randle cut Kentucky's deficit to 68-67 with 22 seconds left. Alex Poythress' attempt at a tying 3-pointer fell short and Brenton Williams hit two more foul shots to clinch it.

Calipari didn't talk to reporters after the game, leaving Robic to say he had no idea why his boss was so mad.

"You'll have to ask him. I know he's not here. I guess a call didn't go our way here and there," Robic said.

The Wildcats shot just 26.9 percent (14 of 52) from the field. They only stayed in it thanks to 33-of-42 shooting from the foul line and a 46-28 edge on the glass.

Poor shooting has become an ongoing problem for Kentucky. The Wildcats shot just 34 percent in a 71-67 overtime loss to Arkansas and 42 percent in an overtime win over LSU the game before.

Williams scored 25 points for South Carolina, 15 on free throws. He made all four foul shots on Calipari's technical and two more when assistant Orlando Antigua got another technical.

Aaron Harrison led Kentucky with 21 points. He made just four of his 16 shots but went 11 of 12 on free throws. James Young added 19 points and Randle had 10 points and 15 rebounds.

The Wildcats trailed 48-32 with 14:13 left after South Carolina made six of its first eight shots in the second half. Kentucky was still down 16 after Williams' free throws and a jumper by Duane Notice after Calipari's second technical.

But the Wildcats didn't fold. Andrew Harrison hit a 3-pointer with 3:11 left that cut the Gamecocks' lead to 59-56. Laimonas Chatkevicius pulled down an offensive rebound for South Carolina and was fouled. He hit both foul shots.

After two free throws by Kentucky cut the Gamecocks' lead to 62-58 with just under 2 minutes left, Chatkevicius dunked in a rebound. Young hit a 3-pointer for Kentucky to leave the Wildcats down three and Chatkevicius followed with a baby hook to put South Carolina ahead 66-61 with 44.3 seconds left.

Chatkevicius finished with eight points. Thornwell had 14.