Aldershot secured National League survival and York are all-but safe after a 2-2 draw at the LNER Community Stadium.
Substitute Tyler Frost converted a corner in stoppage time to rescue a point for Shots and maintain their five-point cushion over 21st-placed Torquay, who drew by the same score at Altrincham.
The visitors went into the game unbeaten in four and broke the deadlock in the 16th minute when Haji Mnoga, on loan from Portsmouth, headed in Ryan Glover’s corner for his first goal since December 2020.
But York, who had lost three on the spin, levelled in the 56th minute when Shaqai Forde was brought down inside the box and top scorer Lenell John-Lewis converted the penalty for his 17th goal of the season.
York were awarded another penalty with 20 minutes left after John-Lewis was upended by goalkeeper Luca Ashby-Hammond.
John-Lewis saw his spot-kick hit the post but the ball rebounded in off Aldershot’s Corey Jordan.
Oliver Dyson headed against the post for the Minstermen who were denied victory by Frost’s late effort but they sit three points clear of Torquay with a superior goal difference going into the final day.