Joe Shaughnessy headed in a late equaliser as Dundee drew 2-2 with Kilmarnock after a dramatic finale at Rugby Park.
Luke McCowan had given the visitors a first-half lead and they looked to be heading towards a victory until Joe Wright’s header brought Killie level with five minutes remaining.
Substitute Rory McKenzie then gave the hosts the lead in the third minute of stoppage time, lashing home after Gary Mackay-Steven’s cross fell invitingly for him inside the box.
But two minutes later, Owen Beck’s corner landed on the head of Shaughnessy who scored a dramatic leveller to ensure the Scottish Premiership match ended in a draw.
Kilmarnock manager Derek McInnes had opted to just make one change following his side’s 1-0 win at St Mirren in midweek, with Wright starting in place of Corrie Ndaba.
Dundee boss Tony Docherty made three changes following his side’s 3-0 defeat to Celtic on Boxing Day, with Josh Mulligan, Mohamad Sylla and Ryan Howley coming into the starting line up.
Killie were fastest out of the traps and they came close in the fourth minute as Kyle Vassell latched on to a flick-on but he could only drill straight at Dundee goalkeeper Trevor Carson.
Dundee’s first effort came in the 17th minute when Jordan McGhee headed well over, but the away side grew into the game and began to dominate possession.
McCowan had been seeing a lot of the ball, coming in off the left wing, and it was the midfielder who broke the deadlock in the 35th minute.
Receiving a pass 25 yards out, McCowan showed composure to work a yard of space before curling a precise shot beyond Will Dennis into the bottom corner of the goal.
It was Dundee who continued to look the more likely to score and Dennis had to be alert to dive at the feet of Scott Tiffoney, who bore down on goal as the score remained 1-0 at the break.
Dundee almost doubled their lead shortly after the break as the impressive McCowan fired low across the box but Amadou Bakayoko was unable to get on the end of it.
The hosts were then inches away from a leveller on the hour mark as Wright headed against the outside of the post from a corner.
Kilmarnock continued to push and Dundee keeper Carson had to come out smartly to block Vassell’s close-range attempt.
The hosts had been the better side as the match edged towards a conclusion and with five minutes to go they managed to get back on level terms.
Dundee keeper Carson was unable to claim a corner cleanly and as the ball popped up in the air it was met by the head of Wright who nodded home to make it 1-1.
The visitors’ lead was very nearly restored just seconds later, however, as the lively Beck jinked forward before striking the crossbar with a powerful right-footed attempt from the edge of the area.
Kilmarnock then thought they had won it deep into added time as McKenzie lashed home to send the home fans wild.
But their celebrations were to be short-lived, as Dundee captain Shaughnessy headed home from the last move of the match.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country