Cian Ashford struck a 96th-minute winner for Cardiff as they put a huge dent in Southampton's bid for automatic promotion with a 2-1 win at Cardiff City Stadium.
The Saints took an early lead through Joe Aribo and looked comfortable for much of the game before they were overhauled by a tremendous fightback from the Bluebirds.
Southampton came into the game on the back of picking up nine points from three games in a week.
They saw Leicester go top of the table with their 2-0 home win over West Brom prior to their kick-off and were chasing a fourth win in a row to go level on points with Leeds in third.
Saints boss Russell Martin saw his team get off to a flying start with a goal in the 12th minute.
Prior to that Stuart Armstrong's shot across the home goal had hit the post, but there was no stopping Aribo's shot as he gave the Saints the lead. Ethan Horvath had managed to keep out Adam Armstrong's initial effort, but Aribo showed good composure to strike the rebound home.
If it had not have been for the heroics of American goalkeeper Horvath the game could have been out of sight by the break. His form, and the lack of finishing skills from Southampton's players, meant there was still only a goal in it at half-time.
Two terrible back passes, firstly from Rubin Colwill and then from Ollie Tanner, put Horvath under huge pressure. He saw Adam Armstrong shoot over the top from the first and then watched in amazement and relief as David Brooks failed to beat him from point blank range with the second.
It ended up as 12 shots to four in favour of the visitors in the first half alone, with six of them on target.
The pressure continued after the break with shot after shot whistling past the home posts.
Just short of the hour mark Adam Armstrong had a diving header at the far post from a Che Adams cross superbly saved on the line by Horvath as Cardiff once again rode their luck.
With the score still delicately poised going into the final quarter Southampton were in danger of getting caught out due to their failure to finish their chances and so it proved in the 68th minute when a neat raid down the right flank saw 21-year-old substitute wing back Raheem Conte make a name for himself on his debut.
He raced to the byline, crossed into the danger zone and Famara Diedhiou side-footed home the equaliser.
What had been a stroll in the park for much of the game suddenly turned into a dog fight for the Saints in their battle for automatic promotion.
Alex McCarthy was then forced to tip over a a vicious shot from the right by Yakou Mete to keep the scores level and Cardiff became bolder and bolder as they pushed forward looking for a second.
It almost came from Diedhiou early on in the nine minutes of added time when he headed down from a Joe Ralls free kick on the right to force McCarthy into another important save.
Then came Ashford's pile-driver from 25 yards that was helped on its way with a deflection past McCarthy.
Cardiff City: Hovarth, Romeo (Conte 65’), Goutas, Phillips, Ralls, Siopis, Turnbull (Diedhiou 61’), R.Colwill, Ashford, Tanner (Giles 77’), Meite. Subs: Turner, Lawlor, Wintle, J. Colwill, Antwi, Sawyers.
Southampton: McCarthy, Walker-Peters, Harwood-Bellis, Bednarek, Manning (Bree 45’), Smallbone (Edozie 80’), Aribo (Rothwell), S Armstrong, Brooks (Fraser 80’), Adams, A Armstrong © (Sulemana 80’).Subs: Lumley, Stephens, Charles, Dibling, Kamaldeen.