Chris Long scored a first-half brace as Northampton ended their six-game winless run with victory over Walsall at Sixfields.
The Cobblers had lost five of their last six matches but recovered from an early setback to down the in-form Saddlers and climb out of the League One relegation zone.
Walsall moved ahead after only 90 seconds when Northampton goalkeeper David Cornell lost possession to Amadou Bakayoko, who squared for Erhun Oztumer to stroke into the bottom corner.
But they were immediately pegged back in an explosive start as Long nodded in an equaliser just three minutes later after Mark Gillespie had brilliantly kept out John-Joe O'Toole.
Goalmouth action dried up thereafter but Northampton completed the turnaround late in the first half when Long, found by David Buchanan, shot into the bottom corner from the edge of the box.
The Saddlers spent much of the second period chasing an equaliser but could not find it and they had Bakayoko sent off for a poor challenge in stoppage-time, with Northampton's Matt Crooks also seeing red.