Simon Walton scored eight minutes from time as Crawley Town condemned struggling York City to a 1-0 defeat at the Broadfield Stadium.
Both sides, who are in the bottom half of League Two, had chances to break the deadlock in the opening minutes as Rhys Murphy sent a header over from close range for the hosts before Vadaine Oliver missed at the other end.
York continued to press for an opener during the first period, with Michael Coulson being denied by Darryl Flahavan before the Crawley keeper was called into action again to stop another Oliver effort.
After the break, Shamir Fenelon came close to giving the hosts a breakthrough when he forced a save out of Scott Flinders.
However, Town were awarded a penalty in the dying minutes after Eddie Nolan brought down Sonny Bradley.
Walton stepped and guided his penalty past Flinders as Crawley snatched a victory, which takes them up to 14th for the time being.