Highland League outfit Deveronvale overcame a late fightback from Elgin City to knock the Third Division side out of the Scottish Cup.
Mark Chisholm and Ian Murray had the home side 2-0 up within 10 minutes and a Mark Smith prod and Mike McKenzie's low strike put them firmly in control.
Martin Johnston headed one back after 39 minutes and added a second after the break before Graeme Watt made it 5-2.
Steven Mackay's screamer and Johnston's hat-trick made for a tense finale.
Deveronvale: Blanchard, Dolan, Gilbert, Chisholm, Fraser, Brown, Urquhart, Smith, McKenzie, Murray (McWilliam 78), Watt (Ewen 83). Subs Not Used: Cowie, Pirie, Knight.
Goals: Chisholm 6, Murray 10, Smith 26, McKenzie 29, Watt 61.
Elgin City: Renton, Campbell (Nelson 63), McGraw (Low 59), Dickson, Hind, Moffatt, Docherty, Gardiner (Kaczan 37), Johnston, Charlesworth, Mackay. Subs Not Used: Muir, Brewin.
Goals: Johnston 39, 55, Mackay 70, Johnston 74.
Att: 1,700
Ref: S Finnie