A blistering three-goal spell in the final eight minutes saw Rob Roy progress into the last 16 of the West of Scotland Cup.
The visitors had the early upper hand with Kevin Watt testing Troon ’keeper Ally Semple with a snap shot before Gary McMenamin headed a Chris Duff cross over the bar.
In the 15th minute Semple just beat Willie Sawyers in a race for the ball in the home penalty box.
But it was Troon who snatched a 17th minute lead when Adam Forsyth was afforded space to advance before dispatching a left foot volley high past Rabs ’keeper Jordan Brown.
Troon pushed forward in an attempt to extend their lead with Forsyth bringing out a smart block from Brown.
But Rob Roy looked dangerous on the break and clawed themselves back onto level terms in the 29th minute when Duff crossed from the right for Sawyers to rise and send a deft header past Semple into the net.
Watt showed some sparkling skill inside the Troon penalty box before his cross just eluded Sawyers’s touch in front of goal.
As the interval approached, and with Rabs playing fast flowing football, Barr headed over the bar and Duff fired narrowly past.
Rob Roy felt that they were denied a 55th minute penalty when Watt appesared to be impeded.
But referee Reid awarded a free-kick at the edge of the penalty box, Jordan McGuire rippling the side netting from the award.
Midway through the half the Ayrshire side came back into the match but lacked the guile to break down a stubborn Rabs rearguard.
With 20 minutes remaining Duff missed a glorious chance to put Rabs in front when, through on goal, he hit the ball against Semple then saw his effort from the rebound cleared by Spence.
The visitors looked the more dangerous as the half progressed with Barr heading wide of the post and Watt just failing to connect with substitute Upton’s curling cross.
Rob Roy then finished the game in dramatic style when substitute Steven Aitken, only on the park less than a minute, unleashed a stunning volley high past Semple in the 82nd minute to give his side a merited lead.
Two minutes later Aitken connected with Duff’s pinpoint cross to give his side a two-goal advantage.
And Sawyers then put the icing on Rabs’ cake three minutes before the end, scoring with a close range effort for a well-deserved double and a 4-1 victory which booked their place in the last 16.