LEXINGTON, Ky. (AP) -- Marcus Lattimore ran for two touchdowns and Connor Shaw passed for another in the second half as No. 6 South Carolina scored 31 straight points for a 38-17 victory against Kentucky on Saturday night.
Shaw was 15 of 18 for 148 yards as the Gamecocks (5-0, 3-0 Southeastern Conference) moved into a tie with Florida and Georgia atop the East division, with the Bulldogs coming to Columbia, S.C., next week.
Lattimore rushed for 120 yards on 23 carries and Kenny Miles added a 17-yard score for South Carolina, which trailed Kentucky (1-4, 0-2) 17-7 after a ragged first half.
The Gamecocks returned to score on five of six possessions thanks to Shaw, who hit Damiere Byrd with a 30-yard touchdown before Miles' TD put them ahead to stay.
Kentucky freshman Jalen Whitlow was 12 of 23 for 114 yards in relief of Maxwell Smith, who was knocked out on the first series with an ankle injury.
Smith was tackled low by Byron Jerideau. His cleats appeared to be caught in the turf and he immediately grabbed his left ankle, lying on the field for several moments before heading to the bench.
Trainers taped the ankle and he tried to walk on it before heading to the locker room for X-rays.
That again forced Whitlow into an emergency situation but the difference this time was the freshman's weeklong preparation.
It didn't show immediately as he was quickly sacked after replacing Smith, but after the defense twice denied Shaw on two runs at the 1, Whitlow made the work pay off.
Kentucky went 94 yards in 16 plays, helped by Raymond Sanders' 28-yard run and two by Jonathan George for 25 yards. Whitlow, with great protection, chipped in a 20-yard pass to DeMarco Robinson before Sanders got the Wildcats down to the 5 and settled for Craig McIntosh's 22-yard field goal and an early lead.
South Carolina eventually regrouped to lead 7-3 as Shaw led a 64-yard drive helped by his 37-yard pass to a wide-open Ace Sanders, who added a 3-yard touchdown reception two plays later.
Kentucky scored on its next two drives covering 67 and 34 yards, the latter of which was set up by its special teams as Daron Blaylock leaped over the protection to block Tyler Hull's punt that A.J. Legree recovered.
Whitlow's passing and running got the Wildcats a 10-7 lead, connecting with Legree twice for 26 yards followed by two runs covering the final 12, including an 8-yard scoring scramble.
Raymond Sanders' 10-yard run made it 17-7 with 1:52 left in the half.
The Wildcats got another scoring opportunity just before halftime when a snap sailed over Shaw's head and was recovered by Taylor Wyndham at the 10. It failed when Whitlow was stripped of the ball, and despite Kentucky's recovering the ball at the 3, the clock ran out before it could run a play.
That turnover summed up an out-of-sync first half for South Carolina, which began when Bruce Elllington dropped Shaw's first pass. There went his quest to match Tee Martin's SEC record of 23 consecutive completions, and little improved afterward for the Gamecocks.
They were outgained 173-108, as the Wildcats limited Shaw's passing and running. He was also sacked twice and South Carolina punted twice.
The Gamecocks came out more focused and physical in the third quarter and wasted little time taking the lead. Shaw hit Byrd in the back of the end zone for a 30-yard touchdown to close within 14-17, and Miles put South Carolina ahead on the next possession.