Relieved Lee Bullen was convinced Ayr United were heading for the Scottish Cup exit door.

The Honest Men eventually saw off Elgin City 4-1 in extra-time after trailing their League Two opponents until the 89th minute. Fraser Bryden’s late, late strike cancelled out Kane Hester’s opener before a Ben Dempsey penalty and Dipo Akinyemi’s double piled the pain on a demoralised City.

Ayr, second in the Championship and targeting promotion to the top-flight, were desperately poor for long periods and easily nullified by Gavin Price's well-organised unit. But Bryden's scrappy goal - admittedly owed to their refusal to give up the ghost - proved too brutal a blow for Elgin to recover from, and Ayr ruthlessly put them out of their misery over the extra half hour.

They will now join bitter rivals Kilmarnock in the last eight draw, and there could yet be an Ayrshire trio in the hat if underdogs Darvel can spring another shock when they host Falkirk at Recreation Park on Monday night.

But Bullen confessed his team are fortunate to be there at all.

“I’m a very, very relieved coach,” the Somerset Park manager said. “As time went on, I didn’t think we were going to get that break. First-half, we didn’t deserve it. Second-half, maybe we did – there was more intent and belief.

“That goal [from Bryden] would have been a dagger to Elgin. The momentum swung a bit in the second-half but I didn’t think the goal was coming, to be brutally honest.

“But when we did, it popped their balloon and our boys relaxed in extra-time. Ultimately, in the cup, nobody remembers how you get there.”

Elgin manager Price was visibly gutted afterwards – but maintained his players could be proud of their efforts. They created a string of opportunities to notch a second, but found Ayr keeper Aidan McAdams on top of his game.

“Sick is an understatement,” Price said. “With 90 minutes played we’ve got one foot in the quarter-final. We couldn’t see it through but I’m incredibly proud of how we played. It shows what we’re capable of, not just in defence – we were brave on the ball and had the better chances, but you have to take one or two of them to get through a tie like this.

“The penalty? We’ll have to have a look, but it looked harsh.”