Northampton moved to within one point of the top of League Two after a hard-fought victory against their victory local derby rivals.
The Cobblers secured the success thanks to a tenth-minute volley from David Hunt, who was recalled to the midfield after being left out in midweek against Wycombe, and a fierce strike by top scorer Scott McGleish four minutes from the end.
Hunt's volley after two efforts had been blocked by blue shirted defenders was one of the few moments of excitement in a drab first half although Drewe Broughton went close at the other end firing wide from the edge of the box.
The turning point of the game arrived in the 56th minute when Northampton's proud defensive record was almost breached.
The Cobblers have now kept four clean sheets in their last five league matches but a cracking effort from Marcus Kelly cannoned against the underside of the crossbar before Petr Mikolanda headed in the rebound. However, Diamonds' joy was short-lived as the goal was ruled out for offside against the striker.
McGleish immediately sent in a flying header which clipped the top of the Diamonds bar before the same player fired narrowly over.
Diamonds threatened to snatch a point in the closing stages after bringing on substitute Simeon Jackson. With ten minutes left Broughton flicked on a Rob Gier free-kick but Jackson sent his header wide and then the same player just missed the target with a bobbling effort.
The stage was set for McGleish to clinch the points which he did turning sharply 15 yards from goal after Pedj Bojic had played the ball into his path.