Joe Shaughnessy earned Dundee a Scottish Premiership point with the last kick of the ball against Kilmarnock in an incredible conclusion at Rugby Park.
Luke McCowan's fine first-half strike looked to be a rare highlight in a mundane contest, before the late madness was ignited by Joe Wright's header with five minutes of normal time to go.
Kilmarnock's fantastic run looked to have been extended when substitute Rory McKenzie poked home in injury time to put them in front, but dogged Dundee weren't down yet.
In a final foray forward, Owen Beck's corner was turned in by visiting captain Shaughnessy to cap off an explosive finale at Rugby Park.
Keep up to date with KilmarnockThe latest Dundee newsAn excellent run of form gave the hosts confidence heading into the game, shown by Kyle Vassell's audacious volley in the first minute.
After that was saved routinely by Trevor Carson, the game was lacking life before McCowan added another stunner to his collection with an arrowed finish from distance.
Dundee could have doubled their advantage early in the second period had Amadou Bakayoko connected with a drilled delivery at the end of a searing counter.
Having become accustomed to formidable home performances, the unsettled crowd was lifted when Wright's bullet header forced Carson into an superb sprawling save.
The defender would find the back of the net when he stood tall to finally make the most of a Kilmarnock corner and avoid just a third home defeat of the league season.
Relief turned into raptures when McKenzie ghosted into the box to fire in a winner, but Rugby Park was silenced when the imposing Shaughnessy snatched a point at the death in front of a joyous travelling support.
Player of the match - Joe Shaughnessy (Dundee)
The Dundee captain had batted away many Kilmarnock's advances before chaos broke out, then had his say with a late leveller to spare his side's blushes.Late show leaves both sides ruing result - analysis
Nobody could have seen that conclusion coming with six minutes of regular time to go.
In the previous 84 minutes, Dundee looked to have stormed fortress Rugby Park and given their high-flying hosts a taste of their own medicine.
Kilmarnock haven't necessarily outplayed every opponent on their charge up the table, but they certainly have outfought them. Here though, it was the visitors displaying all the grit to seemingly grind out a win.
Their late antics through Wright and McKenzie seemed to display the character that those inside the dressing room have been talking up in recent weeks. Had they hung on, they would have cut the gap to Hearts in third and made a serious statement of intent.
However, McInnes was scuppered by his former assistant as Tony Docherty's team failed to accept defeat and bounced back to land a sucker punch right at the end.
The division's surprise package continue to show their quality and resolve. On another day, they could have headed home celebrating an away win at a tough venue.
What's next?
Kilmarnock head to Ibrox on 2 January, while Dundee welcome St Johnstone to Dens Park at the same time (both 15:00 GMT).
Line-ups
Kilmarnock
Formation 4-4-2
1Dennis5Mayo4WrightSubstituted forNdabaat 89'minutes17Findlay6DeasSubstituted forPolworthat 45'minutes11ArmstrongSubstituted forMackay-Stevenat 77'minutes8LyonsSubstituted forMcKenzieat 43'minutes12WatsonSubstituted forDonnellyat 77'minutesBooked at 83mins10KennedyBooked at 24mins9Vassell23WatkinsSubstitutes
3Ndaba7McKenzie14Sanders15Murray20O'Hara21Dallas22Donnelly31Polworth39Mackay-StevenDundee
Formation 3-5-2
31Carson6McGhee5Shaughnessy25Donnelly21HowleySubstituted forBoatengat 68'minutesBooked at 87mins15MulliganSubstituted forKerrat 82'minutes28Sylla17McCowan3Beck7TiffoneySubstituted forReillyat 78'minutes9BakayokoSubstitutes
1Legzdins2Kerr10Cameron14Ashcroft18Reilly19Robertson20Rudden23Boateng32LewisReferee:David Dickinson
Attendance:5,780
Live Text
Match ends, Kilmarnock 2, Dundee 2.
Second Half ends, Kilmarnock 2, Dundee 2.
Goal! Kilmarnock 2, Dundee 2. Joe Shaughnessy (Dundee) header from the centre of the box to the centre of the goal. Assisted by Owen Beck with a cross following a corner.
Corner, Dundee. Conceded by Stuart Findlay.
Goal! Kilmarnock 2, Dundee 1. Rory McKenzie (Kilmarnock) left footed shot from the centre of the box to the bottom left corner. Assisted by Marley Watkins.
Attempt blocked. Marley Watkins (Kilmarnock) right footed shot from outside the box is blocked. Assisted by Gary Mackay-Steven.
Corner, Kilmarnock. Conceded by Malachi Boateng.
Substitution, Kilmarnock. Corrie Ndaba replaces Joe Wright because of an injury.
Delay over. They are ready to continue.
Delay in match (Kilmarnock).
Malachi Boateng (Dundee) is shown the yellow card for a bad foul.
Gary Mackay-Steven (Kilmarnock) wins a free kick in the defensive half.
Foul by Cammy Kerr (Dundee).
Owen Beck (Dundee) hits the bar with a right footed shot from the right side of the box.
Goal! Kilmarnock 1, Dundee 1. Joe Wright (Kilmarnock) header from the centre of the box to the top left corner following a corner.
Corner, Kilmarnock. Conceded by Aaron Donnelly.
Liam Donnelly (Kilmarnock) is shown the yellow card for a bad foul.
Foul by Liam Donnelly (Kilmarnock).
Amadou Bakayoko (Dundee) wins a free kick in the attacking half.
Liam Polworth (Kilmarnock) wins a free kick in the defensive half.
Player of the match
MayoLewis Mayo
with an average of 6.68
Kilmarnock
Squad number5Player nameMayo
Squad number7Player nameMcKenzie
Squad number23Player nameWatkins
Squad number17Player nameFindlay
Squad number1Player nameDennis
Squad number10Player nameKennedy
Squad number12Player nameWatson
Squad number6Player nameDeas
Squad number3Player nameNdaba
Squad number22Player nameDonnelly
Squad number9Player nameVassell
Squad number39Player nameMackay-Steven
Squad number11Player nameArmstrong
Squad number4Player nameWright
Squad number31Player namePolworth
Squad number8Player nameLyons
Dundee
Squad number23Player nameBoateng
Squad number3Player nameBeck
Squad number17Player nameMcCowan
Squad number5Player nameShaughnessy
Squad number28Player nameSylla
Squad number6Player nameMcGhee
Squad number15Player nameMulligan
Squad number31Player nameCarson
Squad number7Player nameTiffoney
Squad number25Player nameDonnelly
Squad number9Player nameBakayoko
Squad number21Player nameHowley
Squad number18Player nameReilly
Squad number2Player nameKerr