COLUMBIA — It was all set up perfectly for South Carolina. Big lead. Inferior opponent. Another chance for a blowout.

Then the Gamecocks’ potentially fatal flaw reared its ugly head.

USC led woeful Kentucky — the worst team in the SEC — by as little as six points at home in the fourth quarter Saturday night. The Gamecocks held on to win 35-28, extending their winning streak to three games.

Coach Steve Spurrier entered the postgame media room shouting, “We win! We win!” but his disappointment with USC’s inconsistency was clear.

“Barely won the game, but it is what it is,” Spurrier said. “We can’t slow down anybody much when the second half, fourth quarter gets rolling. But we’re 4-1 and getting ready for Arkansas next week. A lot of guys playing super, most of them on offense. Trying to think when a big defensive play occurred. Can’t remember one.”

The Gamecocks (4-1, 2-1 SEC East) have now given up at least two touchdowns and 15 points in the fourth quarter in each of their past three games. Against Kentucky, the defense may have hit its low point.

In a classic flash of bluntness, Spurrier said he expected Kentucky to score 17 points against his defense. The Wildcats (1-4, 0-2 SEC East) scored 21 points in the fourth quarter alone.

USC jumped out to a 21-point lead in the second quarter, opening the game with three straight touchdowns. The Gamecocks were playing without star defensive end Jadeveon Clowney, but there was no reason to fret. This was an easy win, a glorified open week.

It turned into another too-close-for-comfort victory.

Spurrier and defensive coordinator Lorenzo Ward expected Clowney to play Saturday night. Before kickoff, Clowney informed them he would not dress.

“I was totally surprised,” Ward said. “He went through the walkthrough earlier (Saturday) and he said he was hurting, but I thought he was going to play.”

Clowney’s absence was notable in the fourth quarter.

In less than two minutes, Kentucky cut a 20-point deficit after three quarters into a 27-21 game with 11:50 left thanks to a fumbled kickoff return from South Carolina junior Bruce Ellington.

At least there was quarterback Connor Shaw, running back Mike Davis and the Gamecocks’ offense. While its defense and special teams threatened to fall apart, USC scored four touchdowns and accumulated 453 yards.

Shaw completed 17 of 20 passes for 262 yards, including a 62-yard touchdown to Damiere Byrd in the first quarter. He added 50 rushing yards on nine carries, including South Carolina’s clinching 2-yard touchdown run in the fourth quarter.

Shaw, who was playing with a sprained right shoulder, said he made the decision one day after his team’s win over Central Florida that he would play against Kentucky.

“It’s my senior year. I didn’t want to miss another game,” Shaw said. “So I lived in the treatment room this week, and on (last) Sunday I was able to move it around a little bit, and I was able to toss Monday. So I just knew I was going to be able to play.”

On his final carry of the night, Davis cracked the 100-yard mark for the fourth time in five games this season. The sophomore tailback finished with 106 yards on 21 carries and had two first-half touchdowns. Davis now has eight rushing touchdowns on the season.

The Gamecocks travel to Arkansas next week for the first of a three-game road trip. In Fayetteville, USC hopes to find the solution to its fourth-quarter riddle.

“We just have to go to practice and watch the film and see what we can do better,” junior defensive tackle Kelcy Quarles said. “It’s happened every game. Obviously something is going on. We just have to go back to the drawing board, get back on the practice field and see what we can do better.”