CLEMSON — Since the middle of last season, as so many things veered off the planned course for South Carolina, the Gamecocks proved that the best of seasons are often defined by how a team handles that which it did not expect, the jarring developments that can derail lesser teams.

Last season, quarterback Stephen Garcia was kicked off the team, leaving sophomore Connor Shaw to step in. Shaw answered the challenge by helping USC finish 11-2 and go 5-1 down the stretch without injured tailback Marcus Lattimore.

In this season’s seventh and eighth games, the Gamecocks saw their hopes of making the Southeastern Conference championship game fizzle with back-to-back road losses to LSU and Florida, the latter a 44-11 debacle pockmarked by USC mistakes. In the ninth game, Lattimore suffered another knee injury, more devastating than last year’s.

Leaning on Shaw and defense, the Gamecocks went 3-0 without Lattimore, entering Saturday night’s game at Clemson. But Shaw has nursed a sprained left foot since the Oct. 27 win over Tennessee, when Lattimore got hurt. Shaw aggravated the injury last week against Wofford and didn’t heal enough in time for the Clemson game, leaving sophomore Dylan Thompson to start.

In keeping with USC’s recent theme, Thompson rose to the lofty stage and helped USC beat Clemson 27-17, for the Gamecocks’ second ever four-game winning streak over the Tigers.

Thompson completed 23 of 41 passes for 310 yards, three touchdowns and one interception. Shaw could have played, and will be able to in the bowl game, but coach Steve Spurrier stuck with Thompson on Saturday.

Thompson was not entirely green.

Before Saturday, he completed 36 of 76 passes this season for 600 yards, five touchdowns and one interception. His most significant action came in the second game, against East Carolina. He played the entire game for Shaw, who was injured, and completed 21 of 37 passes for 330 yards, three touchdowns and zero interceptions.

Since then, Thompson’s only meaningful action came in the second halves against Alabama-Birmingham on Sept. 15 and Florida on Oct. 20. Like the ECU game, those games provided few tense moments. USC beat ECU 48-10, led UAB 21-6 at half and trailed Florida 21-6.

As Saturday night unfolded, it became clear that Shaw’s cracked right throwing shoulder, which he suffered in the opener at Vanderbilt and sidelined him for ECU, turned out to be among the most important developments of USC’s season, but not in the way most observers thought. The shoulder pain did not linger for Shaw, but it did allow Thompson to get valuable experience.

“I wasn’t nervous at all (on Saturday),” Thompson said. “The Florida game, I feel like toward the end, I finally got comfortable. Getting all the reps in practice this week, I was confident.”

Said receiver Ace Sanders, who had 119 yards and a touchdown: “He was exactly what his position said: He was the quarterback of the team. He was calm. We knew what he was capable of.”

Though Thompson was far from perfect, he demonstrated admirable poise. On USC’s first drive of the second half, he made the biggest throw of his career — a 34-yard touchdown pass to Sanders, cutting across the field, on third down and 16. That put USC up 17-14 with 11:48 left in the third quarter. Thompson, a devout Christian, celebrated by running toward the end zone and pointing skyward.

USC never trailed again.

Thompson seems to lack Shaw’s mobility, but he iced the game with a brilliant sequence in the fourth quarter. On third and 19 at Clemson’s 26, Spurrier called a quarterback draw. Thompson took the snap and surveyed the defense. He was expecting a zone, but he saw man-to-man, and his receivers had all the defensive backs blocked. Thompson ran untouched for 20 yards.

“I’m kind of athletic, I guess,” Thompson said with a smile. “The main thing was blocking. The holes were wide open. I think anyone could have done what I did.”

Three plays later, on third and goal, he hit Bruce Ellington for a six-yard touchdown that put USC up 27-17 with 4:17 left. Just as important, the drive consumed 7:47.

After the score, Thompson pointed up again — an image that might become as iconic in USC history as quarterback Steve Taneyhill raising his arms in the rain at Clemson in 1992, the year USC debuted in the Southeastern Conference. The Gamecocks had yet to prove themselves as a consistent winner then. Now, 20 years later, they find themselves 21-4 since the start of last season, because, once again, they rolled with their changes.