Iain Wilson broke Dundee hearts with a late winner as 10-man Kilmarnock came from behind to win 3-2 in a pulsating encounter at Rugby Park.
The hosts went a man down after Gary Dicker was sent off for a reckless lunge at 2-1 down, but Killie responded with goals from Kris Boyd and Wilson three minutes from time to claim a dramatic three points.
Steven Caulker had earlier scored an emotional goal on his return to football after off-field issues that interrupted his career, but that goal proved in vain as Dundee collapsed in the final 20 minutes.
Eamonn Brophy and Sofien Moussa had earlier scored before Caulker gave Dundee a deserved lead, but in-form Killie responded magnificently to going a man down to pick up their seventh home win on the bounce.
Dundee boss Neil McCann made clear his disappointment after a lacklustre display in the Scottish Cup on Saturday, but he would have been heartened by their start as they settled into their passing groove early on.
That was until the seventh minute when on their first attack Kilmarnock won a corner, from which Rory McKenzie’s delivery found its way to Brophy on the corner of the box and the forward drove a low effort through a mass of bodies for an early lead.
That did not stop Dundee from playing their stuff however, and they continued to threaten, with Moussa and Mark O’Hara testing goalkeeper Jamie MacDonald, who then got down well to save from Jon Aurtenetxe.
Moussa finally got the goal they deserved, though it came in controversial circumstances in the 33rd minute.
Caulker went close with a header but referee Nick Walsh pointed to the spot after an apparent handball from Dicker in the middle of a crowded box, and Moussa stepped up calmly to roll the ball in for a deserved equaliser.
The second half started slowly, but it kicked into life just before the hour as Caulker made a dart to the near post from a corner and produced a bullet header into the net to spark emotional celebrations in his first game of professional football since September.
Things took another turn for the worse for the hosts as Dicker flew into Roarie Deacon on the touchline and was shown a straight red card for a reckless challenge.
Steve Clarke was forced to change things up and he got a response from his players through the ever-reliable Boyd.
Lee Erwin played a defence-splitting through ball for the striker and he curled into the bottom corner for his 15th of the season and from then on there only looked like one team who was going to win.
Sure enough it was Wilson who was in the right place to trickle an effort in off the far post for an 87th-minute winner.