TAMPA, Fla. — Connor Shaw led No. 11 South Carolina to the brink of victory and Dylan Thompson carried the Gamecocks over the hump in the Outback Bowl.

Thompson came off the bench to throw a 32-yard touchdown pass with 11 seconds remaining Tuesday, enabling South Carolina to match a school record for victories in a season with a 33-28 win over No. 19 Michigan.

Thompson replaced Shaw during the winning drive, covering the final 43 yards after Shaw began the march from his own 30. Devin Gardner's third TD pass of the game had given Michigan a 28-27 lead.

Shaw threw for 227 yards and two touchdowns after missing South Carolina's regular season finale with a left foot sprain. Thompson led the Gamecocks (11-2) to a victory over their archrival Clemson, and threw for 117 yards and two TDs as a backup Tuesday.

Gardner threw for 214 yards in his fifth start for Michigan (8-5) since Denard Robinson injured his right elbow late in the season. Robinson took some snaps at quarterback and even attempted his first passes in a game since Oct. 27, but lined up mostly at running back and rushed for 100 yards on 23 carries.

Ace Sanders caught TD passes of 4 yards from Thompson and 31 yards from Shaw, who completed 18 of 26 passes before limping off on the final drive. The speedy receiver had nine catches for 92 yards and also scored on a 63-yard punt return — one of four plays over 50 yards that Michigan yielded.

Gardner was 18-for-36, including TD passes of 5 yards to Drew Dileo and 10 and 17 yards to Jeremy Gallon, who gave Michigan its late lead and finished with career bests of nine receptions and 145 yards. Robinson set the NCAA record for career yards rushing by a quarterback, hiking his four-year total to 4,495.

South Carolina standout defensive end Jadeveon Clowney was quiet for much of the day, but shifted momentum in the fourth quarter with a big hit on Michigan's Vincent Smith that sent the running back's helmet rolling several yards backward and caused a fumble that the SEC defensive player of the year recovered to set up Shaw's TD pass to Sanders for a 27-22 lead.

Robinson entered the game during Michigan's second possession and ran for 15 yards on his first play. Gardner threw 26 yards to Gallon, moving the Wolverines into position for Brendan Gibbons to kick a 39-yard field goal.

Down 14-3 after Sanders' punt return, Michigan marched 75 yards in 11 plays to trim South Carolina's lead to four.