Dumbarton’s battle for Championship survival suffered a big blow as they lost 2-1 to Ayr United at Somerset Park.
Robert Thomson gave the Sons the lead after 21 minutes after great play from Lewis Vaughan.
But Farid El Alagui scored with the last kick of the first half and Robbie Crawford netted the hosts’ winner after 51 minutes.
Garry Fleming was sent off after 71 minutes, with United goalkeeper Greg Fleming pulling off two brilliant saves to help Ayr to victory.
The result pulled Ayr level with Dumbarton on points with a game in hand, and St Mirren are four behind with a game in hand.
Stevie Aitken was forced into making three changes, with Ross McCrorie and Daniel Harvie on Scotland Under-19 duty, and Christian Nade rushed away to be with his partner who went into labour on Saturday.
Mark Docherty returned from suspension, with Sam Stanton and Vaughan also returning.
The opening minutes of the game were evenly contested, with both sides trying to make the early breakthrough.
Alan Forrest tried to place a curling effort into the bottom right-hand corner, but Alan Martin was able to palm the effort away after 16 minutes.
A mistake between the Ayr centre-backs led to the ball falling to Callum Gallagher and he forced Greg Fleming into a diving save.
But a good break from Vaughan saw him beat the offside trap and find Thomson, who slotted home to give the visitors the lead.
Gallagher won an aerial battle on the edge of the box, however his through ball to Vaughan was cut out.
Ayr’s Farid El Alagui took a tumble after 29 minutes, but the referee waved away the protests.
The away side began to weather the storm as Ayr took control of the game, however their final ball was lacking.
But just before half-time, a catalogue of mistakes gave The Honest Men an equaliser.
Stirling initially gave away a poor foul on the edge of the box. Sons tried to scramble the ball away, but after a goal-line clearance the ball came back into the box and El Alagui smashed it against the crossbar before tapping in the rebound.
Ayr took the lead just six minutes into the second half. Martin managed to get a touch on Robbie Crawford’s shot from inside the box, but the ball managed to creep in.
As Sons tried to get back into the game, Garry Fleming’s rash challenge on the halfway line saw him head straight down the tunnel. He had only been on the pitch for six minutes.
Yet this galvinised Dumbarton and they had two great chances to score.
The first came after 76 minutes. Sam Stanton’s cross found Thomson at the back post, but Greg Fleming scrambled across the goal to pull off a spectacular save.
Minutes later, he was called into action again, this time saving Gregor Buchanan’s headed effort.
Dumbarton have failed to pick up a win in four meetings against Ian McCall’s side this season, but will be aiming to get back on track at home to Morton on Saturday. Kick-off is at 3pm.
AYR: Fleming, Devlin, Boyle, Gilmour, Rose, Crawford, Forrest (Moore, 82), El Alagui, Meggatt, Balatoni, Docherty (McGuffie, 78). Subs (not used): Hart, Murphy, Harkins, Cairney, Wardrope, McGuffie.
DUMBARTON: Martin, Docherty, Buchanan, Carswell, Gallagher (Fleming, 64), Thomson, Barr (Lang, 71), Smith, Stirling, Vaughan. Subs (not used): Ewings, Prior, Nade.