Dundee snatched defeat from the jaws of victory as they were made to pay for missing chance after chance against Partick Thistle.
A-Jay Leitch-Smith leapt to head home for the Dark Blues on eight minutes after Kevin Holt’s cross-cum-shot spun his way.
That didn’t tell the story of the visitors’ dominance, however, particularly in the first half.
They should have been well clear of the jittery Jags but profligacy in front of goal, including a squandered penalty from Leitch-Smith, cost them as the hosts equalised through Ryan Edwards on 75 minutes then grabbed an injury-time winner through substitute Miles Storey.
As unlikely as the outcome looked for most of the match, it was struggling Partick’s first league win of the season and left Dundee still looking for their first away success of the campaign.
The Dens men made only one change to the line-up that kicked off at Celtic Park the previous weekend.
Jesse Curran was promoted to starter after coming on as a substitute against the Hoops last Saturday, with Roarie Deacon taking his seat on the bench.
Thistle left out former Dundee United man Blair Spittal, who was named as a sub.
The visitors started like an express train and, on two minutes, Leitch-Smith found himself in space inside the box but his cross was cut out.
Just a minute later, Leitch-Smith was in bags of space just eight yards but his shot was saved by Jags keeper Tomas Cerny. The ball spun back to Lewis Spence, who sclaffed his effort wide of the post.
The chances kept coming for the Dark Blues and, with just four minutes gone, striker Sofien Moussa got on the end of a cross from Curran but nodded over the bar.
Up at the other end, Dens goalkeeper Scott Bain produced a brilliant save to keep out a Danny Devine header before the Dark Blues took a predictable lead on eight minutes.
A great run from Glen Kamara saw him move deep into the Thistle box before squaring to Moussa, whose shot was cleared off the line.
Holt pounced on the loose ball, though, and his deflected cross reached Leitch-Smith, who found the net with a diving header.
There was almost a spectacular leveller for the hosts just four minutes later when Steven Lawless spotted Bain off his line and sent a chip from 35 yards on to the roof of the Dundee net.
Bain then saved a low strike from Edwards as Partick began to get forward but it was Dundee who threatened next, a sweeping move ending when Moussa slid the ball wide at the far post after Spence had tried a shot.
The visitors then squandered an absolutely glorious chance to make it 2-0 on 23 minutes.
Leitch-Smith was sent through on goal thanks to a hash of a clearance from the Jags and when he rounded keeper Cerny he was brought down.
It was a clear spotkick and Cerny was booked for the foul.
However, the goalie became the home hero when he stuck out a boot to save Leitch-Smith’s penalty.
With 28 minutes on the clock, Moussa headed over again after being picked out by Curran before the young Australian midfielder fired a shot of his own past the post.
Moussa blasted another strike past at the back post on 37 minutes as the Dark Blues continued to attack with menace.
Devine then failed to get a header on target for Partick from a great position before referee Euan Anderson called time on a fine first-half display from the Dens men.
The visitors had to make a change just four minutes after the restart, with Deacon coming on for Paul McGowan.
Leitch-Smith crashed a shot into a group of Thistle players a minute later and there were loud claims for another penalty for handball – ignored by ref Anderson.
Deacon quickly go stuck in and eh sent a 20-yard strike over the Jags bar on 52 minutes, while Leitch-Smith was a whisker away just seconds later as the Dundee attacks kept raining down on the home goal.
Thistle brought on Spittal, Storey and Kris Doolan as they were in search of a leveller, while the visitors replaced the impressive Leitch-Smith with Mark O’Hara on 67 minutes.
There was a serious scare for Neil McCann’s men on 71 minutes when Jack Hendry clipped the ball away from Storey and it went just a little too close to his own goal for comfort.
Dundee were still dangerous, though, and Curran fired over when in space inside the area.
However, all those missed chances came back to haunt the Dark Blues when Thistle equalised with the scrappiest of goals.
The scorer was Edwards, who finally fired home from six yards out after Bain had saved superbly from Doolan.
The action kept on coming and Dundee’s Moussa was at fault when he shot straight at Cerny, who gathered the ball at the second attempt.
Both sides still felt they could clinch it in the closing stages and it was Partcik who managed it, with Doolan beating the offside trap and squaring for Storey to smash the ball into the net.
Partick Thistle: Cerny, Turnbull, Keown, Erskine (Spittal 60), Lawless, Barton, Devine, McGinn, Sammon (Doolan 64), Edwards, McCarthy (Storey 56). Subs not used: Scully, Nitriansky, Nisbet, Fraser.
Dundee: Bain, Holt, O’Dea, Leitch-Smith (O’Hara 67), Kamara, Moussa (El Bakhtaoui 84), McGowan (Deacon 49), Hendry, Meekings, Curran, Spence. Subs not used: Parish, Kerr, Wolters, Waddell.
Referee: Euan Anderson.