Dundee snatched defeat from the jaws of victory at Rugby Park as they lost 3-2 to 10-man Kilmarnock.
It had looked like debut maker Steven Caulker had given the Dark Blues a much-needed win in their battle against relegation but the hosts, by then without red-carded Gary Dicker, scored twice late on to nick the three points.
There were a mere five minutes on the clock when Eamonn Brophy opened the scoring for the home team before Dundee striker Sofien Moussa equalised from the penalty spot on 32 minutes.
The visitors took the lead through Caulker’s excellent header on 56 minutes before Killie were reduced to 10 men, losing Dicker for a shocking challneg on Roarie Deacon.
Steve Clarke’s men didn’t buckle, though, and veteran marksman Kris Boyd brought things level on 74 minutes.
The roof then caved on on the visitors when Killie substitute Iain Wilson netted in off the post with just three minutes remaining.
The result leaves Neil McCann’s men dicing with danger in ninth spot and they travel to play 10th-placed Partick Thistle at Firhill on Saturday.
Dundee had handed a much-anticipated debut to England cap Caulker, with the 26-year-old former Tottenham player slotting into a three-man backline alongside Genseric Kusunga and skipper Darren O’Dea.
Deacon was rewarded for some good form in the under-20s with a start, while striker Simon Murray was back in after being cup-tie for Saturday’s home loss to Motherwell. That meant there were no starting places for Cammy Kerr, Kevin Holt and A-Jay Leitch.
Killie were without star man Youssouf Mulumbu, who was injured, while the suspended Jordan Jones was also missing.
The pitch was covered in snow in the morning but it being plastic all that was required was a brush to clear it and it was game on. Some of the hardy away fans were late arriving, due to travel delays on the M80 motorway.
Dundee were on the front foot on four minutes when Moussa got his head to a Paul McGowan cross inside the six-yard box but the big Tunisian was offside and keeper Jamie MacDonald saved anyway.
Just a minute later, though, the red-stripped Dark Blues were a goal down.
Brophy, nicknamed the Wolfman, drew first blood when he found loads of time inside the box following a corner from the right.
Killie captain Boyd had challenged Kusunga and the Swiss-born Angolan’s clearance only got as far as Brophy, who produced a fine finish.
On 12 minutes, Moussa had another go with his head. He stayed onside this time but could only nod over the bar.
Kusunga was booked for a foul on Brophy before former Killie man Mark O’Hara, who also picked up a yellow card for a challenge on Gary Dicker, stung the hands of home keeper MacDonald with a strike from outside the box.
With 26 minutes on the clock, McGowan did really well to control the ball with his back to goal at the edge of the Killie area before bringing a save out of MacDonald with a decent shot.
Jon Aurtenetxe almost pulled Dundee level with a half-volley that MacDonald pushed away but the equaliser was merely delayed until the 32nd minute.
Caulker brought yet another save out of the busy MacDonald and in the stramash that followed the ball bounced up and struck Dicker on the arm.
Referee Nick Walsh pointed to the spot and, after a minute’s delay for Dicker’s first booking of the night, Moussa stepped up to send the Killie goalie the wrong way.
It was his fourth goal of the season – all penalties – and it was a deserved one for the Dark Blues, who had clawed their way back right back into the game after conceding that early opener.
Stephen O’Donnell fired over the Dundee bar before Parish came to Dundee’s rescue with a great save to keep out Brophy’s strike.
There was a blow for the hosts just five minutes after the restart when the dangerous Brophy had to go off injured to be replaced by Lee Erwin.
The Killie fans were continuously moaning about the refereeing, with a huge roar going up whenever their side got a decision and shouts of “You don’t know what you’re doing” aimed at from match official Walsh.
That wasn’t the Dens men’s problem, though, and they just got on with the job, taking the lead on 56 minutes.
It was a debut goal for defender Caulker, who rose above the defence to bullet home a fine header after Deacon’s corner came over from the left.
The Ayrshire men were then reduced to 10 men three minutes later when Dicker was sent packing for a terrible tackle on Deacon out on the Dundee left.
That, of course, had the already raging home support complaining even louder at ref Walsh but it was a bad challenge and Dicker, having been booked earlier for the penalty offence, deserved to get his second yellow then a red.
Killie were losing their discipline, as shown by a booking for sub Wilson just minutes after replacing Scott Boyd followed by a yellow for Rory McKenzie.
On 68 minutes, Murray raced forward for the Dark Blues and looked a good bet to make it 3-1 but he curled the ball over when he should have tested goalie MacDonald.
Killie weren’t finished, though, and they drew level on 74 minutes, thanks to you-know-who.
The Dundee backline were caught out as a super reverse pass was played from sub Erwin to Boyd, who swept his right-foot shot past parish from just inside the box.
The Dark Blues brought on Faissal El Bakhtaoui for Kusunga but, somehow, it was Kilmarnock who were doing most of the pressing and they were rewarded with the winning goal three minutes from time.
After McKenzie had curled a shot over the Dundee bar, sub Wilson kept his composure inside a busy box before prodding his shot in off Parish’s right-hand post.
Caulker almost made it 3-3 in the 89th minute but MacDonald pushed his header past the post.
Kilmarnock: MacDonald, O’Donnell, Broadfoot, S. Boyd (Wilson 62), Findlay, McKenzie, Tshibola, Dicker, Taylor, Brophy (Erwin 50), K. Boyd. Subs not used: Fasan, Waters, Simpson, Frizzell, Burke.
Dundee: Parish, Caulker, Kusunga (El Bakhtaoui 79), O’Dea, Kamara, Moussa, O’Hara, Aurtenetxe, Murray, McGowan, Deacon (Kerr 73). Subs not used: Malherbe, Leitch-Smith, Spence, Waddell, Lambert.
Referee: Nick Walsh.