York moved up to fourth on the table after a last-gasp winner sealed a 2-1 victory at Northwich Victoria, leaving manager Billy McEwan a relieved man.
Nathan Peat curled in a long-range free-kick in the last minute of the match to earn three points and keep the pressure on Weymouth and Gravesend, who are playing tonight.
Clayton Donaldson put York ahead against Vics but Kieran Charnock equalised before Peat's sublime winner spared his manager more heartache.
A pleased McEwan told BBC: "A lot of frustration came out because we lost at the weekend and it was important we bounced back.
"We got pegged back but, credit to the players, they battled and got the win."