Before a decent crowd of 4,448 Northampton Town were undone by two quickfire second half goals after being the better side in the first half.
York City went ahead on 68 minutes when Ryan Bowman had time to head home and this was quickly followed by Wes Fletcher converting a penalty after Kevin Amankwaah had fouled Michael Coulson.
Todays defeat leaves the Cobblers bottom of the division and four points from safety. They now have a mountain to climb as caretaker manager Andy King acknowledged afterwards.
He told BBC Radio Northampton: "We lost a game we needed to win. There was nice, neat football in the first half, in a deadpan game.
"We tried to up the tempo in the second half and create chances and we didn't do that."