Clovis Kamdjo's late strike lifted Barnet off the foot of the League Two table as Torquay were beaten 1-0 at Underhill.
The Cameroonian scored after Jake Hyde's marauding run with 12 minutes remaining to extend the Bees' unbeaten league run to four games - taking them above Aldershot in the process.
The visitors were making all the early running and Billy Bodin's 16th-minute shot deflected just wide off a relieved David Stephens. Joe Oastler then embarked on a counter-attack, shooting from the edge of the box, but Graham Stack made an easy save low down to his right.
Anthony Edgar went close midway through the first half but his cross trickled across the goal line without anyone on-rushing to convert.
The impressive Bodin had two more chances to break the deadlock before the interval, but missed the target on both occasions and the sides went in level.
Lee Mansell forced a superb save from Stack, who did well to palm wide after 52 minutes, but it was Kamdjo's first goal of the season that sealed a vital three points.