Kilmarnock’s 28-year top-flight run is hanging in the balance after Dundee claimed first blood in their play-off scrap.
Early goals at the start of each half from Jordan McGhee and Charlie Adam mean James McPake’s Championship runners-up will head for Monday night’s Rugby Park return with a 2-1 lead.
It was an error-strewn display from the Premiership outfit but Brandon Haunstrup late strike means Killie are not out of it yet.
This is the second time in five years that the Ayrshiremen have been forced to fight for their lives in the demotion shootout.
In 2016, Lee Clark’s team were also faced with a one-goal deficit after losing their opening clash with Falkirk.
Current boss Tommy Wright will now be praying his team can cobble together a repeat of the 4-0 second-leg rampage his predecessor’s team ran up back then to rescue their top-flight status.
But they will have to perform an awful lot better than this abject display.
Dens Park was hosting fans for the first time in 14 months, with a pocket of 500 lucky season-ticket holders sheltered up from a lashing downpour in the Bobby Cox Stand.
And it took McPake’s team just six minutes to get them off their seats.
Yet another beauty of a pass from former Rangers and Liverpool ace Adam in behind the sleeping Chris Burke found Cammy Kerr racing forward.
Danny Mullen threw his head at Kerr’s first-time cross, which Colin Doyle could only push onto the post. As the ball span back into the six-yard box, McGhee was quickest to react as he bundled home.
Dundee could have placed one foot in the top division inside nine minutes as Haunstrup’s fresh-air swipe gifted Paul McMullan a golden chance, but this time Doyle’s block cleared the danger.
The Dark Blues’ legs looked far fresher than Killie’s after their shortened 27-game season but it was Mullen’s legs which wobbled at the vital moment as he wasted another big opening.
Killie had offered little before the break other than a couple of wayward Kyle Lafferty attempts.
And they found themselves in further trouble 90 seconds into the second half as Christie Elliott robbed Gary Dicker outside the visitors’ box. McMullan charged into the box before teeing up Adam, who swept home a precious second from 12 yards.
Wright’s team at least had plenty of time to retrieve the situation but there was a desperate look about Burke’s decision to throw himself down at Dundee goalkeeper Adam Legzdins’ feet inside the box, correctly collecting a booking from referee John Beaton.
Killie’s unforced errors continued to mount up. Kirk Broadfoot got away with one as his failure to control a loose ball let in Mullen but again Doyle produced a solid save.
However, they finally got a break of the ball with 13 minutes left as Power fed Haunstrup, who fired home at the second attempt after his first effort bounced back at him off Mullen.
But it is advantage Dundee now as they look to become just the third team from the second tier to claim play-off joy.