Dundee United were denied the victory they wanted on an emotional day at Tannadice.
The hope before kick-off was that an occasion which marked the passing of club legend Ralph Milne would see the Tangerines beat fellow strugglers Kilmarnock.
United performed well on the day but a fabulous goal from Kevin McHattie a 30-yard low strike with just two minutes remaining saw the Ayrshire men record their first win of the campaign.
Jackie McNamara’s men had looked the likelier victors after levelling through a Billy Mckay penalty on 66 minutes.
Kallum Higgingbotham had given Killie the lead from the spot in the first half.
Nevertheless, United now sit second bottom of the Premiership – just a point clear of bottom team Partick Thistle and with just one win from seven matches.
The Tangerines started brightly and new frontman Adam Taggart fired the ball over the bar from just outside the box after 30 seconds.
Mckay then got his toe on the end of a Ryan McGowan cross on nine minutes but Killie keeper Jamie MacDonald was well positioned to save.
The visitors threatened on 18 minutes, though, and Rory McKenzie’s volley at the back post wasn’t far away.
Mckay went on a mazy run into the Killie box but had his shot blocked and the ball ran away for a corner.
Killie veteran Jamie Hamill was booked for a trip on United’s Scott Fraser at the edge of box and when the freekick was taken by another new boy, Aaron Kuhl, the midfielder hit the sidenetting.
Having passed up their chances, United fell behind with just a minute of the first half remaining.
Skipper Sean Dillon was the villain as he fouled McKenzie inside the box and the resultant penalty was tucked away nicely by Higginbotham.
There was a great through ball from McKay on 51 minutes that played in Dow but his angled shot from inside the box was blocked.
On 66 minutes, United won a penalty of their own when Spittal’s shot was saved by the hand of Lee Ashcroft.
Up stepped Mckay to blast the ball down the middle and into the net to make it 1-1.
The hosts were looking for the winner now and brought on Aidan Connolly and Darko Bodul with 20 minutes to go.
A neat move by United on 77 minutes almost ended with another goal from Mckay but his shot on the turn went just wide.
Mckay was involved again two minutes later when he flicked the ball goalwards after a sweeping move involving Bodul and Dow.
It was all United going into the final 10 minutes and Bodul shot wide of the post after neat footwork had created an opening.
The home team then missed an incredible chance on 83 minutes.
It looked like they could walk the ball into the Killie net but Bodul decided to square to Dow for a tap-in. Remarkably, Dow saw his shot saved by MacDonald and the danger was eventually cleared by the visitors.
Having squandered those opportunities, United fell behind to a wonder winner from Killie with two minutes remaining.
There seemed little danger when the ball reached McHattie out on the left but he took a touch and then slammed a 30-yard strike along the deck and inside keeper Luis Zwick’s near post to stun the home crowd.
Attendance: 8,244.
Dundee United: Zwick, Dillon, Morris, Mckay, McGowan, Dow, Durnan, Spittal (Connolly 70), Fraser, Kuhl, Taggart (Bodul 70). Subs not used: McCallum, Souttar, Rankin, Telfer, Donaldson.
Kilmarnock: MacDonald, Hamill, Findlay, McKenzie, Higginbotham (Obadeyi 71), Westlake, Ashcroft, Slater (Robinson 78), McHattie, Kiltie, Magennis (Boyd 74). Subs not used: Brennan, O’Hara, Balatoni, Barbour.
Referee: Brian Colvin.