Bourne Town bounced back from a poor midweek display to stun one of the promotion favourites.
Substitute Cardin Pierre-Liverpool gave the Wakes the lead six minutes past the hour mark.
Five minutes later Scott Spearink added a second for Bourne.
Northampton Spencer cut the deficit a minute from full-time through Curtis Avery.
But it was too late to prevent their first away defeat of the season as Bourne took maximum points.
Deeping Rangers lost for the first time in six years at Compton Park, in the process Cogenhoe United completing a double and moving into the Premier Division top three.
Stuart Smeathers made the home breakthrough two minutes into added time at the end of the first half.
Young striker Luke Emery had a second for the Cooks four minutes into the second half.
Levi Wright’s 70th-minute Rangers reply kept them within touching distance of their hosts.