Andrew Surman bagged the first hat-trick of his career to keep Southampton's automatic promotion hopes alive after 10-man Barnsley had given them a real fright.
Surman wrapped up his treble with a stoppage-time penalty to cap a three-goal flurry from the Saints in the final 17 minutes.
Struggling Barnsley also had goal hero Danny Nardiello and assistant manager Ryan Kidd sent off in a humdinger of a match.
Nardiello stunned the home fans by putting third-bottom Barnsley into a second-minute lead with his fourth goal of the season.
Southampton-born Brian Howard threaded the perfect pass for Nardiello to race in behind the Saints defence and hammer his shot past the helpless Kelvin Davis.
Surman drew George Burley's men level only nine minutes later with his first goal in 10 months.
The ball fell kindly for Surman on the edge of the penalty area after Jermaine Wright's corner had been only half-cleared and the South African-born midfielder picked his spot in the bottom left corner of the net.
Saints should have been home and dry by half-time but for the awful finishing of Polish striker Marek Saganowski.
Saganowski wasted the first of two glorious opportunities to open his account in the 14th minute when he put a free header wide of the left-hand post after Gareth Bale had crossed from the left.
Saganowski was the man on the spot again 10 minutes before half-time when strike partner Kenwyne Jones caused havoc in the visitors defence, but the on-loan Troyes frontman put his shot straight at goalkeeper Nick Colgan who tipped over.
Saints finally took the lead for the first time three minutes after the re-start when Jones notched his fifth goal in just four games.
Jones flicked a glancing header past Colgan from six yards after latching onto Rudi Skacel's in-swinging cross.
Barnsley hit back 20 minutes later though against the run of play when Hungarian striker Istvan Ferenczi marked his full debut with his first goal in English football.
Former Colchester midfielder Sam Togwell crossed from the right and Ferenczi looked as stunned as the home players when he nodded the ball into the top corner.
Saints should have been back in front inside 60 seconds when Jones hit a post when it looked easier to score and Colombian midfielder John Viafara blazed over from the rebound.
Ferenczi went from hero to villain when he handled a Bale cross three minutes later, allowing the in-form Jones to fire home his second from the penalty spot.
All hell broke loose on the touchline as Kidd was sent to the stands for over-protesting to referee Mike Thorpe.
Suffolk official Thorpe angered visiting boss Simon Davey again a couple of minutes later when he showed Nardiello a straight red for an alleged stamp on Southampton defender Chris Baird.
Surman put the game beyond depleted Barnsley's reach 10 minutes from time when he picked out the top left-hand corner after arriving unnoticed to substitute Bradley Wright-Phillips' cross.
Surman completed his amazing afternoon when he converted a second Southampton spot-kick in the dying seconds after Howard had handled on the edge of the six-yard box.