James Grady's hat-trick ensured Gretna outclassed Preston Athletic in their Scottish Cup first round match.
Grady gave the visitors the lead with a shot into the left corner and got his second with an accurate strike.
Derek Townsley headed in a third before Grady bagged his treble. Kenny Deuchar netted from a rebound before David Bingham scored from eight yards.
The home side grabbed two late consolation goals through Sean McAuley and Phil Hobbins.