South Carolina went toe-to-toe with No. 9 Florida Saturday and had a chance to upset a top-10 team for the second week in a row until things went horribly wrong in the fourth quarter. 

Trailing 20-17 early in the fourth quarter, Florida converted a critical fourth-down play and quarterback Kyle Trask hit receiver Freddie Swain for a 25-yard touchdown pass on the next play to give the Gators the lead.  

Down 24-20, quarterback Ryan Hilinski was sacked and fumbled on South Carolina's next possession, with Florida recovering at the South Carolina 29-yard line. Three plays later, Trask threw a 4-yard touchdown pass to tight end Kyle Pitts to give the Gators a 31-20 lead with 7:53 remaining in the game. 

PHOTO GALLERIES: Allen Sharpe | Jenny Dilworth

South Carolina turned the ball over on downs on its next possession and Florida scored again to put the Gamecocks away and secure a 38-27 win. 

“In the fourth quarter, we have got to make some plays. We’ve got to put our guys in better positions to be successful, and we didn’t do that," South Carolina head coach Will Muschamp said. “They made the plays at the end and we didn’t, and that’s on me." 

A week after upsetting No. 3 Georgia, South Carolina fell to 3-4 on the season and 2-3 in the SEC. Florida improved to 7-1, 4-1. 

Hilinski struggled in his sixth career start, completing just 17-of-35 passes for 170 yards, but the Gamecocks rushed for 217 yards. With Rico Dowdle leaving with an injury early in the game, Tavien Feaster led the way with his biggest game at South Carolina, rushing for 166 yards and a touchdown. Mon Denson added 58 yards rushing and a touchdown. 

South Carolina out-gained Florida 387-354, but much of it came with the game out of reach. The Gamecocks were just 7-of-20 on third and fourth down. 

It marked the second straight season that Florida rallied to beat South Carolina. The Gators trailed 31-14 in Gainesville last year before reeling off 21 straight points to win 35-31. 

South Carolina had a couple of critical calls go against it, which infuriated fans and led to Muschamp getting flagged for unsportsmanlike conduct late in the game. 

Jaycee Horn intercepted a pass in the end zone with about eight minutes remaining but was flagged for holding on the play. A touchdown pass by Trask put Florida up 31-20 on the next play. 

Early in the third quarter, Florida's Dameon Pierce broke a 75-yard touchdown run to tie the game at 17-17, but replays showed that Florida receiver Tyrie Cleveland grabbed South Carolina defensive back Israel Mukuamu and held him the whole way down the left sideline. No call was made. 

“I was getting held the whole way, but the ref didn’t see it, I guess," Mukuamu said. 

Muschamp said the officiating was difficult on his players but they have to play through it. 

“It’s hard, it’s really hard, but we are just going to fight through it," he said.  "That’s what we are here at South Carolina, we are going to fight through what we have to.”

"We have to be able to tune all that out," Mukuamu said. 

The Gamecocks led 20-17 in the third quarter when Florida began to rally. After a 31-yard field goal by Parker White, the Gators pinned South Carolina deep in its own territory and took advantage of good field position. Trask converted a big fourth-and-3 play with a pass to Pitts and then capped the 52-yard drive with a 25-yard touchdown pass to Swain to give Florida a 24-20 lead with 9:54 remaining. 

With a damp field and Hilinski struggling, South Carolina kept the ball on the ground and overpowered Florida early in the second half. After Feaster scored on a 21-yard touchdown run, the Gamecocks put together a 72-yard drive behind the running of Feaster and Denson. 

Feaster sparked it with a 33-yard run, and Denson followed with 25 yards on the next play. After eight straight running plays, the drive stalled after Hilinski was sacked on first-and-goal at the 6-yard line. White's 31-yard field goal  gave South Carolina a 20-17 lead with 3:16 remaining in the third quarter but the Gamecock defense, which played well for three quarters, broke down in the fourth quarter and gave up 21 straight points.

“We just missed a couple of plays here and there," defensive tackle Javon Kinlaw said. "We're gonna clean it up." 

With the two teams deadlocked at 10, South Carolina started the second half with a bang with safety Jammie Robinson intercepting a pass and returning it to the Florida 20-yard line. Two plays later, Feaster busted loose for a 21-yard touchdown run to put the Gamecocks up 17-10. 

Florida struck right back, however, to tie the game on the controversial touchdown run by Pierce, which resulted in a chorus of boos from the home crowd. 

Kinlaw refused to blame the officials for the play and questionable calls. 

“Control what you can control," he said. "We left a lot of plays out there. … I put it on myself.”

The two teams played to a stalemate in the first half, struggling on offense, playing solid defense and combining for just 12 first downs.

South Carolina got off to a fast start, with Dowdle gaining eight yards on the first play of the game. Unfortunately, South Carolina's leading rusher limped off the field with a knee injury after the play and did not return.

On the next play, Hilinski hit Bryan Edwards for 41 yards on a flea-flicker play, putting the Gamecocks in scoring position. Denson capped the 75-yard drive with a 1-yard touchdown run to give South Carolina an early 7-0 lead.

Feaster set up the other score with a 36-yard run, leading to White’s 49-yard field goal.

Florida got a first-quarter field goal and then tied the game on a 37-yard touchdown pass from Trask to Jacob Copeland.

The Gamecocks led 20-17 going into the fourth quarter but Florida made some big plays to turn the game. 

“Obviously, it’s a tough loss. They just made more plays than us," Edwards said. 

“There are some critical plays in every game, and they made the ones they needed to make, so credit them," Muschamp said.