York edged to a 2-1 victory over 10-man Altrincham after a stoppage-time Ollie Pearce winner capped off a crazy ending.
The hosts were reduced to 10 men after 16 minutes when Owen German was sent off for bringing down Pearce.
And York eventually took the lead in the 42nd minute when Alex Newby struck an effort into the bottom corner from the edge of the box.
But Altrincham’s Lucas Weaver thought he had grabbed his side a late point with a 90th-minute equaliser.
However, National League top scorer Ollie Pearce responded straight after the restart, with his 21st goal of the campaign moving York up to second.
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.