Christian Smith grabbed a dramatic winning goal two minutes from time as Cambridge came from behind to win.
Rangers went ahead when Ged Murphy crossed from the right and David McNiven slotted home.
Daniel Chillingworth hit a post for Cambridge before they equalised just before the break when David Bridges netted from the edge of the box.
Smith won it for Cambridge late on when he found the bottom corner to lift his side six points clear of the drop zone.
Stafford Rangers: Duggan, Sutton, Daniel, McAughtrie, Talbott, Robin Gibson, Murphy, Griffith (Edwards 90), Reid (Lovatt 69), McNiven, Grayson (Madjo 57).
Subs Not Used: Alex Gibson, Murray.
Goals: McNiven 20.
Cambridge Utd: Herbert, Duncan, Morrison, Page, Bridges, Brown, Pitt (Brady 72), Stephen Smith, Christian Smith, Robbie Simpson, Chillingworth (Purser 90).
Subs Not Used: Josh Simpson, Aidan Collins, Quinton.
Booked: Christian Smith, Pitt, Bridges.
Goals: Bridges 42, Christian Smith 88.
Ref: S Attwell (Warwickshire).