The Cobblers’ chances of claiming automatic promotion were dealt a blow as York City ended their 10-match winning streak at Sixfields.
Ashley Chambers scored in the first half and John Johnson put through his own net in the second to consign Town to a third successive 1-0 defeat and only their fourth loss on home soil this term.
But it could be a damaging one. Wins for Rotherham United and Cheltenham Town mean Northampton could still climb into the top three with a win in their game in hand - at Wycombe on Tuesday night - but that would be reliant on the outcome of the game between the Millers and Bradford the same evening.
Ben Tozer tested the reflexes of Michael Ingham in the York goal with a first-time shot that was palmed over the bar with a strong wrist.
It was York, though, who found the breakthrough in the game. A flighted ball from the right wing fell at the feet of Chambers on the opposite side but inside the box and he cleverly used his feet to break away from John Johnson and find space for the shot.
Lee Nicholls possibly should have done better with the effort, which went through his legs, but it was a good piece of play by Chambers and one which Johnson will not want to see again.
Clarke Carlisle had a header cleared off the line by Tom Platt as the Cobblers looked to mount a response but York had chances of their own, notably Matty Blair’s excellent half volley that Nicholls tipped over the bar at full stretch.
Blair then filed his entry for miss of the season, placing a shot against the foot of the post from no more than three yards and with Nicholls grounded.
Jake Robinson, playing on the left in place of the injured Ishmel Demontagnac, enjoyed a few brief flirtations with attacking positions with one such escapade leading to a rifled left-foot volley that Ingham did well to tip away to safety.
Ingham produced an equally good save from a guided Adebayo Akinfenwa header early in the second half, Carlisle missing the ball completely at the back post on the resultant corner.
The chances continued to come, in varying degrees of quality and precision. Luke Guttridge kicked only air with an acrobatic effort that ended with a skewed Robinson drive wide of the mark from a difficult angle.
When they did craft a clear-cut opportunity, such as the one Akinfenwa put on a plate for O’Donovan, the shot was straight at Ingham, who held well.
The Irishman then overran when in a good position and seconds later York scored their match-securing second.
Blair showed excellent pace to power through a static home midfield and beyond the backline, where he drew Nicholls and passed square only for the ball to rebound off Johnson’s toe and into the net.
Cobblers: Nicholls, Johnson, Carlisle, Collins, Widdowson, Hackett, Tozer, Harding, Robinson, O’Donovan, Akinfenwa
Subs: Guttridge (for Hackett 63), Platt (for Widdowson 76), Moyo (for Robinson 85)
Not used: Snedker, Cameron, Hornby, Dias
York: Ingham, Oyebanjo, Allan, Smith, O’Connell, Blair, Platt, Parslow, Reed, Chambers, Cresswell
Subs: Walker (for Cresswell 42)
Not used: Jameson, Reed, Coulson, Fyfield, Challinor, Doig
Away fans: 719
Referee: Gary Sutton