York’s hopes of automatic promotion from the National League were dealt an apparently terminal blow with a 2-1 defeat against Braintree.
City went into the weekend 11 points behind Barnet and knowing they could not afford any more slip-ups.
But they fell behind in the 25th minute as veteran John Akinde fired in from outside the box.
Josh Stones levelled from a corner in the 35th minute but Jermaine Francis came off the bench to win the match with virtually his first touch 24 minutes from 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.