Updated

Wofford coach Mike Ayers had the same winning expectations coming into No. 12 South Carolina as he does each week in the Southern Conference. His disappointment at losing is also just as huge.

Ayers said his Terriers (8-3) came in planning for victory and nearly pulled it off until the Gamecocks' 17-point fourth quarter led to a 24-7 win on Saturday.

"If we don't turn it over and take care of the ball, then the other side may be a little sad," Ayers said. "Loved the effort of the kids."

Wofford outrushed and outgained South Carolina (9-2) in this one, yet still left with its 16th straight loss in the series.

The game was tied at 7-all in the fourth when things starting going the Gamecocks' way. Adam Yates hit a 23-yard tiebreaking field goal for a 10-7 lead with 11:57 to go. Then Breitenstein was stopped on 4th-and-1 from Wofford's 34 to turn the ball over.

Less than 2 minutes later, Connor Shaw made the Terriers pay for the gamble with an 8-yard touchdown pass to Ace Sanders for a 17-7 lead.

On Wofford's next series, Breitenstein was hit hard by linebacker Reginald Bowens, coughed up the ball and Akeem Auguste took the fumble 31 yards for a touchdown that put the Gamecocks ahead 24-7.

"Our offense is hard to stop if you see it every week and they never see it," Breitenstein said. "I knew we would be able to move the ball, we just sputtered out and died a couple of times."

Kenny Miles had a career-high 127 yards and a touchdown for South Carolina, which won its 11th straight home victory and their its first perfect season (7-0) at Williams-Brice Stadium since 1987. It was coach Steve Spurrier's 64th win at South Carolina, tying him with Rex Enright for most ever in South Carolina history.

"I hadn't thought about this one too much," Spurrier said. "That next one would maybe be a little more special."

Spurrier and the Gamecocks get their first crack at the mark next Saturday night at rival Clemson — and they'd better not play like this against the Tigers. South Carolina couldn't rest easy until a 17-point fourth quarter

The Gamecocks played this one without star defensive end Jadeveon Clowney, who didn't practice all week because of a sprained foot. He's expected back next week when South Carolina closes the season against rival Clemson at Death Valley.

South Carolina's won 16 straight over Wofford, who won a share of the Southern Conference this season and will likely get a bid to the FCS playoffs on Sunday.

Still, the Terriers' quirky, throwback triple-option attack has always given Spurrier's teams fits, nearly knocking off the Gamecocks when the teams met in 2006 (27-20) and in 2010 (23-13).

"These Wofford kids are tough," Spurrier said. "We knew that coming in, and we pretty fortunate to come out winning."

South Carolina looked solid at the start, even without the injured Clowney, holding Wofford to 15 total yards in the opening quarter.

The Gamecocks also were moving easily on offense, crossing into Wofford territory on their first three series. But mistakes cost South Carolina and Wofford eventually took advantage.

Shaw threw a bad interception on Wofford's 33 to linebacker Alvin Scioneaux to end one drive. Freshman tailback Mike Davis was stripped of the ball on the Terriers' 6 while heading to the end zone on another. In between, Miles had a 2-yard TD run to put the Gamecocks up 7-0.

Wofford and Breitenstein finally got going right before halftime with a 12-play, 85-yard drive. Breitenstein, the SoCon's leading rusher with 1,528 yards coming in, carried the final seven times for 46 yards including a 2-yard touchdown with 32 seconds left in the half that tied things 7-7.

Breitenstein finished with 125 yards and a touchdown.

Where does Wofford go from here, Ayers was asked. "Leonard Auditorium tomorrow (on campus) and hopefully we make the playoffs," he said.