Updated

GAINESVILLE, Fla. (AP) -- Wesley Myers scored a season-high 22 points, Chris Silva added a double-double and South Carolina upset No. 20 Florida 77-72 on Wednesday night.

Silva finished with 18 points and 12 rebounds for the Gamecocks, who won the Elite Eight rematch from last year's NCAA Tournament.

South Carolina knocked off the Gators in that one thanks to 42 points in the paint. Coach Frank Martin's team won this one from the 3-point line.

The Gamecocks (13-7, 4-4 Southeastern Conference) hit 11 of 21 shots from beyond the arc, matching their most 3s all season. Myers was 5 of 7 from 3-point range, taking advantage of the league's worst team at defending the 3.

The Gators (14-6, 6-2) led by 11 in the first half and were up 48-39 early in the second. But they had no answer for Myers outside and Silva down low.

Frank Booker sealed the victory by hitting four free throws in the final 40 seconds.

Florida won eight of its previous nine games to return to the rankings for the first time in more than a month.

Egor Koulechov and Jalen Hudson led Florida with 16 points apiece. KeVaughn Allen added 15 for the Gators, who shot 6 of 23 from 3-point range.

Florida had a great chance to tie the game with two minutes to play, but teammates turned the ball over while fighting for a rebound. Silva sank a jumper a few seconds later to make it 73-68.

BIG PICTURE

South Carolina: The Gamecocks picked up an NCAA Tournament-boosting victory on the road against a ranked team. It was the team's first road victory against a ranked team since upsetting then-No. 8 Texas A&M on Feb. 6, 2016. This one came eight days after upsetting Kentucky in Columbia, but might do more for Martin's team come tourney time.

Florida: Gators center John Egbunu took part in pregame warmups for the first time this season, a positive step in his return from reconstructive knee surgery. Egbunu missed the final 10 games last year after tearing the anterior cruciate ligament in his left knee. He began non-contact practice last week and could be a huge help in the post for the Gators when he returns.

HINSON HURT

South Carolina guard Evan Hinson, also a tight end on the football team, left the game with what appeared to be cramping in his right leg midway through the second half. Hinson had to be helped to the bench for treatment, but later returned. The sophomore was playing well before the injury, having tied a career high with eight points.

UP NEXT

South Carolina: Hosts No. 14 Texas Tech in the Big 12/SEC Challenge on Saturday.

Florida: Hosts Baylor in the Big 12/SEC Challenge on Saturday.