Callum Stead struck in each half as Barnet beat York 2-0 at The Hive to move into second place in the National League.
The Bees went ahead in the 27th minute when Stead sent a drive past goalkeeper George Sykes-Kenworthy and into the bottom corner.
Stead then beat Sykes-Kenworthy again in a one-on-one just past the hour mark to double the hosts’ advantage.
What was only a second victory in six saw Dean Brennan’s Barnet go above Bromley on goal difference – the Raves lost 2-0 at Eastleigh – while Neal Ardley’s York, winless in four, drop to 20th, a point above the relegation zone.