Northampton secured their League Two status with a first win in 19 games at the expense of nine-man Stevenage.
Liam Davis fired the hosts into an early lead from close range after Michael Jacobs' corner was not dealt with properly.
Boro were reduced to 10-men when Luke Foster was given a straight red for a foul on Seth Nana Ofori-Twumasi.
Michael Uwuzi doubled the hosts' lead on the rebound before John Mousinho was also given a straight red for Boro.
Northampton boss Gary Johnson told BBC Radio Northampton:
"It was a fantastic atmosphere here today. Everybody realised the importance of the game of course.
"The nil against is fantastic. We were professional.
"We knew it was going to be a passionate affair. We had to make sure we didn't make the lunging tackle we let them do that but we were competitive."
Stevenage manager Graham Westley told BBC Three Counties Radio:
"In the week they have talked a lot. You wish it was different, but they have talked a lot to create the environment that has made those decisions happen.
"Let me look at the video. I may have to ask the referee to do some work during the week. I am sure the appeal system will pay dividends if what I saw is what the video shows.
"It was poor from us. We can talk about decisions but it is not a decision that costs you a goal at a set-play. We know we have made a mistake.
"Young players when they go into pressure situations don't necessarily always react in the right way. Some of these young lads have not performed to their normal standard."