Substitute Ryan Fallowfield scored the pick of the goals as York twice came from behind to secure a 4-2 National League victory over lowly Morecambe.
The home side started brightly but fell behind when Miguel Azeez scored from the penalty spot in the 23rd minute.
York might have been level on the half-hour but Ollie Pearce saw his header from Ollie Banks’ cross come back off the crossbar.
They did get themselves back into it with four minutes of the half remaining when Malachi Fagan-Walcott scored at the far post.
Morecambe regained the lead four minutes after the restart when Ben Tollitt slotted home Mo Sangare’s pass, but Banks blasted the Minstermen back on level terms with half-an-hour remaining.
Alex Hunt’s 66th-minute strike and Fallowfield’s sumptuous volley either side of Azeez’s stoppage-time red card earned York a fourth successive win.
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.