Malachi Fagan-Walcott and Ollie Pearce struck in stoppage time as York came from behind to snatch a 2-1 win at Halifax.
Jamie Cooke had put the hosts ahead after 14 minutes, cutting on to his right foot before lashing home from the edge of the box.
Florent Hoti had chances to double Halifax’s lead but was twice denied by City keeper Harrison Male.
Instead Fagan-Walcott scored in the first minute of stoppage time from a corner and Pearce headed in a dramatic winner six minutes into stoppage time.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.