GAINESVILLE, Fla. (AP) Feleipe Franks placed his index finger across his lips after both touchdown runs, sending a message to a home crowd that booed him earlier.

After the second one, there was nothing Franks could have done to silence the Florida faithful.

Franks accounted for three touchdowns, including the go-ahead score with a little more than four minutes remaining, and the 19th-ranked Gators rallied to beat South Carolina 35-31 Saturday and end a two-game losing streak.

''I'm a super emotional player,'' Franks said. ''That what makes it a two-way street. Lots of people are going to like me and lots of people aren't going to like me. Maybe that's something I shouldn't have did. But at the same time, I'm an emotional player. I want to win as much as anybody in the world. I'm an emotional guy. That's the way I play my game. I do apologize for that.''

Franks dived across the goal line on fourth down from inside the 1-yard line to put the Gators (7-3, 5-3 Southeastern Conference, No. 15 CFP) ahead for the first time all day and for good.

Coach Dan Mullen said he didn't hesitate to go for it even though a short field goal would have tied the game. The Gators overcame a 17-point deficit in the second half to prevent former Florida coach and current South Carolina coach Will Muschamp from getting a win in his second trip back to Gainesville.

C.J. Henderson sealed the victory when he intercepted Jake Bentley's third-down pass on the ensuing drive. Muschamp has dropped eighth of his last 10 games in the Swamp.

''It's a hard, tough loss,'' said Muschamp, who is 0-2 against his former team in Gainesville. ''We had our opportunities. Give Florida credit. They made plays they had to at the end. ... When you go on the road in our league and have the opportunities in front of us, to lose the game, it's gut-wrenching.''

Franks completed 15 of 21 passes for 161 yards and a touchdown. He also ran for 36 yards and two scores a week after getting benched for the third time in two seasons.

Mullen opened up the quarterback competition during the week, but backup Kyle Trask broke a foot in practice Wednesday and is out for the remainder of the regular season. That left Franks as Mullen's only viable option against the Gamecocks (5-4, 4-4).

Still, the home crowd turned on Franks quickly Saturday by booing him after consecutive plays on the first series in which he fumbled and badly overthrew a receiver.

Franks responded after his first TD run.

''He's an emotional kid,'' Mullen said. ''I told him he's going to get booed. ... I also told him don't worry about anything that's not going to help us win the football game. Score a touchdown and get off the sidelines so we can coach you.''

South Carolina (5-4, 4-4) scored touchdowns on its first two possessions and looked like it would roll on the road - much like Missouri did last week. Jake Bentley had TD passes to end both drives, but did little down the stretch.

But Franks and the Gators responded.

The Gators ended up with 367 yards rushing. Jordan Scarlett had 159 yards on the ground. Lamical Perine added 107 yards and two scores. Dynamic receiver Kadarius Toney chipped in 51 yards on four carries.

THE TAKEAWAY

South Carolina: After being up 17 points late in the third quarter, the Gamecocks found themselves in another nail-biter late. It was the team's fifth consecutive game decided by four points or less. They are 3-2 in those.

Florida: The Gators still have hopes of making a big-time bowl game and reaching 10 wins for just the second time in the last six seasons.

MUSCHAMP CONNECTION

Although Muschamp will forever be tied to Florida, he won't have many connections to his former school after this game.

The Gators have six fifth-year seniors who signed with Florida before Muschamp's final season in 2014. Florida also has one more payment to Muschamp to fulfill his severance, a $787,500 deposit later this month. That will complete his $6.3 million buyout.

MISSING MEN

Florida was without three key players: guard Brett Heggie, safety Brad Stewart and receiver Freddie Swain. Heggie and Swain were injured last week against Missouri. Stewart has missed two of the last three games.

UP NEXT

South Carolina hosts Chattanooga of the FCS, a welcome break after eight consecutive conference games.

Florida concludes a three-game homestand against Idaho, also an FCS team. It's the Gators' home finale and senior day.

---

More AP college football: https://apnews.com/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.