McIlroy and playing partner Scott Stallings were nearing the end of their third round when a remote controlled ball – apparently controlled by a spectator on the side of the green – rolled towards the pin.
After circling the hole several times, the ball finally appeared to fall into the cup when it was knocked away by a prone McIlroy, who turned to face the pilot before blocking another run at the hole from the remote controlled ball.
There would be no third try as McIlroy picked up the ball before hurling it into the water guarding the green, much to the delight of spectators.
The cheers quickly turned to boos as the intruder – with a thumbs-down gesture towards nearby fans – was led away by stewards.
“He kept yelling at Rory, ‘This is my dream, this is my dream.’ I don’t know exactly what he dreamed about, but his ball is gone.”
Stallings, who aimed his approach shot from a nearby bunker during the incident, added he was ready to intervene if McIlroy hadn’t taken matters into his own hands.
“I thought it was great,” said the American. “I was just about to go and do the same.”
McIlory finished five strokes behind Cantlay in eighth, securing another top-10 finish after finishing fifth and third at the US and British Opens in recent months.
At the 150th edition of the event at St Andrews, McIlroy saw a tee shot hit an ancient stone on the fairway before another accidentally hit a spectator and broke his hand.