TWO goal hero Ricky Waddell brought Ayr back from the dead and then was ordered to defend just as he was chasing his hat-trick.
But the transfer window recruit from Singapore wasn't complaining as Ayr made it three out of three for caretaker bosses Brian Reid and Mark McGeown.
However, this was the toughest yet as ten man Alloa took a 3-1 half-time lead and looked like hanging on until United hit them with three goals in ten minutes.
His job done, man of the match Waddell was told to retreat and played the last 15 minutes as a left back as Ayr ran down the clock.
Waddell, who made it four goals from six starts, said: "I was looking for my hat-trick but got moved back because Reidy had gone off and David Lowing went into the middle. I'm probably the only other left sided player so I got the shout.
"However, I'm not too bothered where I play as long as we get the three points. We had to win as it's in the back of our minds that we still want to get promotion although it's up to Brechin or Raith to slip up.
"Four goals from January isn't too bad for a wide guy but I've always thought I should be scoring more. Hopefully I can keep on doing it."
Boss in boots Reid admitted Ayr's nerve jangling fightback hadn't been good for the heart but was relieved to keep intact his 100 per cent record.
He said: "We didn't look like ourselves in the first-half and Alloa came at us and caught us on the hop. At half-time 3-1 down, we had a mountain to climb but we had come back against Forfar and knew that if we battled away we might get our rewards.
"We let ourselves down earlier on when Alloa looked hungier and had more urgency but we showed great character to fight back."
Slow starting Ayr were in deep trouble after only 24 minutes as goals from Michael Bolochoweckyj and Fraser Forrest gave injury hit Alloa a shock 2-0 lead.
David Lowing fired in a 25 yard free-kick for his first goal of the season to launch the recovery. Then Alloa suffered again when goal hero Bolochoweckyj copped a straight red card for felling David Dunn with a punch.
However, Alloa weren't for rolling over and they regained their two goal lead in 43 minutes through a Steven McKeown penalty after Craig Pettigrew rashly brought down Kieran McAnespie.
When rookie keeper Scott Findlay handled a passback on the stroke of half-time, Ayr won a free-kick almost on the six yard line but Ryan Stevenson's effort met a predictable wall of bodies.
When Ally Brown made the same error early in the second-half, Alloa were presented with a similar chance but McAnespie's shot met the same difficulties.
Ayr hauled themselves back into contention in 64 minutes when Andy McLaren headed against the post and Waddell pounced on the loose ball.
It was all square six minutes later when skipper Eddie Forrest drove home his third goal in three games. And the stunning fightback continued when Waddell drove home the winner from sub Paul Hyslop's cross.
That was the signal for Waddell to take a step back as Ayr sought to hold on to their precious advantage. But they had to survive an injury time scare when a dippng 30 yard free-kick from McAnespie had to be touched over by Brown.
STAR MEN: ***Ricky Waddell; **Ryan Stevenson; *Mark Casey.
AYR: Brown; Pettigrew (Weaver 53), Forrest, Reid (Hyslop 73), Lowing; Stevenson, Casey, Dunn; Vareille, McLaren, Waddell. Unused subs: Templeton, Robertson, Johnson. Booked: Pettigrew, Dunn.
ALLOA: Findlay; McKeown, Ovenstone (Coult 86), Thomson, Forrest, McColligan, Grant, Stuart (Coleman 71), Bolochoweckyj, McClune (McAulay 81), McAnespie. Unused subs: Townsley, Creer; Booked: Coleman; Sent off: Bolochoweckyj.
Referee: Eddie Smith; Crowd: 947.