Match ends, Northampton Town 0, York City 2.
Goals from Ryan Bowman and Wes Fletcher sealed victory for York at Northampton, who remained four points adrift at the bottom of League Two.
The Cobblers started well as Darren Carter shot wide, Antonio German headed wide and Ishmel Demontagnac had his low drive saved.
But York broke the deadlock when Bowman headed home Josh Carson's cross.
They doubled their lead from the spot after Kevin Amankwaah impeded Michael Coulson and Fletcher converted.
VIEWS FROM THE DRESSING ROOM
Northampton Town caretaker manager Andy King 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.
"I just felt there wasn't the edge and the urgency there. They didn't look the same bunch.
"Too many of them were off the pace."
York City manager Nigel Worthington told BBC Radio York:
"We managed the game very well. We kept playing decent football and we got the all-important second goal.
"It's something to build on. It's nothing to get excited about.
"There's a hell of a long way to go. We want to push on but to get there there's a lot of hard work to go in."
- 2AmankwaahSubstituted forHarriottat 74'minutes
- 12TozerBooked at 35mins
- 29HopeSubstituted forMoyoat 71'minutes
- 7DemontagnacSubstituted forEmertonat 62'minutes
- 2OyebanjoBooked at 85mins
- 5McGurkBooked at 32mins
- 9FletcherSubstituted forJarvisat 86'minutesSubstituted forPlattat 90+2'minutes
- Graham Scott
- Shots on Target
Second Half ends, Northampton Town 0, York City 2.
Substitution, York City. Tom Platt replaces Ryan Jarvis because of an injury.
Attempt blocked. Darren Carter (Northampton Town) right footed shot from the centre of the box is blocked.
Attempt blocked. Gary Deegan (Northampton Town) right footed shot from outside the box is blocked.
Substitution, York City. Ryan Jarvis replaces Wes Fletcher.
Attempt saved. Ben Tozer (Northampton Town) header from the centre of the box is saved in the top centre of the goal.
Corner, Northampton Town. Conceded by Ben Davies.
Lanre Oyebanjo (York City) is shown the yellow card.
Attempt missed. Antonio German (Northampton Town) left footed shot from the centre of the box is too high.
Antonio German (Northampton Town) wins a free kick in the defensive half.
Foul by Lanre Oyebanjo (York City).
Foul by Danny Emerton (Northampton Town).
Russell Penn (York City) wins a free kick in the attacking half.
Darren Carter (Northampton Town) wins a free kick in the attacking half.
Foul by Ryan Bowman (York City).
Substitution, Northampton Town. Matthew Harriott replaces Kevin Amankwaah.
Attempt missed. Ryan Bowman (York City) right footed shot from the left side of the box misses to the left.
Substitution, Northampton Town. David Moyo replaces Hallam Hope.
Goal! Northampton Town 0, York City 2. Wes Fletcher (York City) converts the penalty with a right footed shot to the top right corner.