CHARLESTON, S.C. -- Two bases-loaded walks and a pop fly that was lost in the twilight produced four runs in the third inning, giving the Citadel a lead it would never relinquish as the Bulldogs downed South Carolina 10-8 in front of a record 6,500 fans Wednesday night at Riley Park.

The Citadel (15-23) defeated the sixth-ranked Gamecocks (28-9) for the first time since 2011 but not before Skylar Hunter put an end to an evening of wildness on the part of both pitching staffs by striking out potential tying run Gene Cone in the ninth.

The win was the second of the season for the Bulldogs against a top-10 team, adding to a 5-3 victory against then-No. 8 Louisville on Feb. 15. The Citadel last defeated the Gamecocks on April 12, 2011 when Logan Cribb went eight innings and combined with TJ Clarkson for a 2-0 shutout at Riley Park.

South Carolina has dropped four in a row for the first time since 2009.

The Gamecocks are the eighth team from a power conference the Bulldogs have faced this season and they are 5-5 in those contests. Including Wednesday's win and the earlier victory over Louisville, The Citadel also has wins over Virginia Tech and a pair over Nebraska.

The Bulldogs and Gamecocks meet again on May 13 in Columbia.

The Citadel trailed 2-1 in the third when they took advantage of three consecutive walks, including free passes with the bases loaded to Tyler Griffin and Drew DeKerlegand, to take a 3-2 lead. Pinch hitter Connor Walsh then lifted a fly ball to shallow left center, but Gamecock center fielder Tanner English could not find it off the bat and it dropped in for two runs scored that made it 5-2.

A sacrifice fly by Mason Davis the following inning increased the lead to four before things started getting wild. A two-run double by Kyle Martin and sacrifice fly by Grayson Greiner made it 6-5 in the top of the fifth.

Citadel starter Austin Livingston was sharp through four innings, allowing a solo homer to DC Arendas in the second and a run on a double steal in the third, before the three-run Gamecock fifth. Livingston struck out a career-high eight, besting his previous best of five, and earned his second win of the season.

It was the second strong start of Livingston's career against the Gamecocks. As a freshman a year ago, the right-hander threw four shutout innings and allowed only one earned run overall but did not figure in the decision.

The Bulldogs made it a three-run game again in the bottom of the fifth on a leadoff homer by DeKerlegand, his second of the year, and an RBI single by Ryan Kilgallen. South Carolina bounced right back against reliever Kevin Connell in the sixth as Brison Celek led off with a homer to start a two-run frame.

Davis capped off a big night with his first home run of the season, a line drive over the wall in right, and Griffin doubled in Bo Thompson to make it 10-7 in the seventh. The Gamecocks scored a run off David Rivera in the eighth but left two runners on before Hunter finished them off in the ninth.

Davis led a 12-hit Citadel attack with two singles and his homer, scored three runs and drove in two while stealing his 20th base of the year. Griffin and DeKerlegand both had two hits and combined for five RBI.

Both teams used seven pitchers and combined to walk 18 batters but also left a total of 23 runners on base.