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.