First Division Cowdenbeath booked their place in the semi-finals of the Ramsdens Cup after seeing off East Stirlingshire at Ochilview.
The visitors took an early lead through Marc McKenzie's close-range strike.
However, Third Division Shire levelled when Sean Kelly neatly tucked away David Greenhill's corner.
Kenneth Adamson scored what proved the winner when he received the ball from McKenzie and shot into the bottom corner from the centre of the area.
East Stirling: Hay, Jackson, Miller, Sean Kelly, Shepherd, Herd (Donaldson 85), Devlin (Begg 78), Hunter, Maxwell, Greenhill (Glasgow 87), Turner. Subs Not Used: Gordon, Hume.
Goals: Sean Kelly 24.
Cowdenbeath: Flynn, Brett, Armstrong, Adamson, Linton, McKenzie, Miller, Cameron (O'Brien 46), Milne (Ramsay 55), Stevenson, Coult, O'Brien (Navas 78). Subs Not Used: Wight, Mbu.
Goals: McKenzie 10, Adamson 40.
Ref: Ian Brines (Scotland).