WREXHAM left Sixfields a beaten and broken side after a catastrophic collapse in the last 13 minutes.
In that time, they conceded two penalties, had two defenders sent off and also had coach Joey Jones banished from the touch-line.
Left-back Kevin Sharp was the first to go after Roy Hunter had given the Cobblers a 2-1 lead from a penalty. Sharp was harsh-ly shown a straight red card for a foul and four minutes later it was 3-1 as Sam Parkin put it beyond Wrexham.
Then came the incident involving Jones, who was still smarting about Sharp's sending off.
Jones came out of the dug-out protesting and suddenly all hell let loose.
Manager Dennis Smith tried to restrain Jones, but he kept angrily protesting until referee Rob Styles strode over and motioned the former Wales international to leave the touchline.
Jones was still protesting as he disappeared down the tunnel and there was even more drama to come.
Wrexham substitute Dan Bennett, who came on nine minutes from time, was also shown a red card in stoppage time for what the referee saw as deliberate handball.
Hunter converted that spot kick to make it 4-1 and, as the Cobblers and their fans celebrated, Wrexham supporters drifted away almost resigned to relegation.
That late collapse beggared belief because Wrexham had taken the lead and Smith was about to make a tactical change when the balloon went up.
Smith said, "It was disappointing getting beat like that. With 15 minutes to go, I was going to bring on another striker, but then they got their first penalty and it changed the game. Kevin Sharp was sent off for something I honestly didn't see, but I thought it was harsh to send off a young lad at the end. What are you supposed to do with your hands when someone blasts the ball at you from so close?
"Joey was frustrated, but you have to live with it. It's no good having temper tantrums and getting involved. I feel like saying things, but you have to bite your tongue.''
Even so, it was an ugly end to a game with stakes so high for both clubs. Lee Trundle gave Wrexham a 21st-minute lead with a scorching shot on the turn, but the Cobblers were level two minutes before the break when James Hunt capitalised on indecisive defending.
Thunder rumbled overhead during half-time but no-one expected the storm that broke in that crucial last quarter.
Up to then, the second half was nip-and-tuck with Wrexham keeper Marius Rovde keeping the Red Dragons in it with a magnificent point-blank save from Parkin.
You could have cut the atmosphere with a knife after that as both sides went for victory, but then came the beginning of the end for sad Wrexham. Dennis Lawrence, a tower of strength again at the back, conceded a penalty that Hunter converted and from then on it was a catalogue of controversy as everything seemed to swing against Wrexham.
They now have six games left to avoid the Second Division drop, starting at 7-1 winners Cardiff City on Friday.