Promotion-chasing York made it five wins in a row with a thrilling 3-2 victory away to Brackley Town.
An eventful first half saw Greg Olley net for the first time in a York shirt, giving them the lead 15 minutes in.
Morgan Roberts struck back 10 minutes later to equalise, before Michael Nottingham headed home in the 36th minute to put Brackley ahead.
However, Josh Stones made it level once again four minutes before half-time, with his fifth goal in as many games coming from a back-post finish.
When the winner eventually came it came from the league’s top goal scorer, Ollie Pearce, who fired home into the bottom corner in the 76th minute for his 16th of the season, with York a point behind leaders Rochdale in a congested promotion race.
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.