CLEMSON, S.C. — Clemson’s hope of going to the College Football Playoff is over. So is its 40-game home winning streak, and its nine-year domination of rival South Carolina.

All of ended in one afternoon at Memorial Stadium, as the Gamecocks stunned the nation for a second straight week with a 31-30 victory over No. 8 Clemson. Last week, South Carolina took down then No. 5 Tennessee to end their CFP hopes.

“We were the feel-good story in college football last week, but nobody thought we were good enough to win this game,” South Carolina head coach Shane Beamer said afterward.

The Gamecocks (8-4) were definitely the better team when it mattered the most on Saturday. They rallied from a 14-0 deficit in the game’s first 15 minutes and then fought from behind all afternoon before finally taking the lead on Mitch Jeter’s 35-yard field goal in the fourth quarter.

The Tigers got three more opportunities to win the game, but each time they failed to capitalize. Clemson quarterback DJ Uiagalelei was 0-for-6 on those three drives, while the offense managed just 15 yards.

Clemson (10-2) still had an opportunity to win the game and appeared to be getting the ball near midfield with a little more than two minutes to play. However, Antonio Williams fumbled and the Gamecocks recovered it at the Clemson 44 with 2:09 to play.

Antwane Wells then finished the Tigers off by converting a third-down catch into a first down, snapping Clemson’s seven-game win streak in the series.

“It’s a play here or there. It’s a one-point game,” Clemson head coach Dabo Swinney said. “There’s a lot of things that are demoralizing when you don’t win. Bottom line, South Carolina played better.”

The Gamecocks got 360 passing yards on 25-of-39 passing from quarterback Spencer Rattler, who made up for two costly interceptions by throwing two touchdown passes, including a 72-yard scoring pass to Wells.

The transfer from James Madison finished the afternoon with nine receptions for 131 yards and two touchdowns. He also caught a second-quarter 4-yard touchdown pass from Rattler.

Clemson linebacker Jeremiah Trotter returned an interception 35 yards for a first quarter touchdown that put the Tigers on top, and then Uiagalelei scored from nine yards out for a 14-0 advantage following a 47-yard Will Shipley run.

Shipley finished the afternoon with 132 yards, including an 11-yard touchdown in the third quarter that gave the Tigers a 30-21 lead at the time.

But the Tigers, who have been careless with the football for the last month, coughed it up twice and Uiagalelei threw a fourth-quarter interception. The Clemson quarterback finished the afternoon 8-for-29 for 99 yards with one touchdown.

When it mattered most, Uiagalelei was just 3-of-16 for 13 yards in the fourth quarter.

“I am pissed. I am definitely pissed,” he said. “I hate losing. It definitely sucks losing, especially to South Carolina. I know how much it means to a lot of guys on this team and coaches, a lot people here and Clemson fans. It definitely sucks.

“Losing any game does, but especially to South Carolina.”

The Tigers will try to regroup and get ready for next week’s ACC Championship Game against No. 17 North Carolina, who lost on Friday to rival NC State.