Gretna U19s 2 Aberdeen U19s 3
Maguire, who had been playing for the first team against Celtic only a day earlier, opened the scoring with a calm finish when one-on-one with the Gretna goalkeeper after 16 minutes.
However, Gretna stunned the Dons with two goals in the next five minutes to go in at the break 2-1 ahead.
Highly rated Dons starlet Michael Paton equalised midway through the second half, and that's how it stood at full time.
The match stayed level until six minutes into the second period of extra time, when Maguire hit a screamer from midway inside the Gretna half to deservedly send the Dons through to the semis.