A hat-trick from Wells did the damage as the visitors leapfrogged Town in the League Two table.
Little was done in terms of relegation damage as the Cobblers remain eight points above the drop zone but Aidy Boothroyd will be disappointed that his side's upward momentum has been halted.
Full match report and reaction to follow on Cobblers Mad.