A stoppage time penalty by Scott Boden handed Chesterfield a crucial victory in their bid to starve off National League relegation.
John Sheridan's side were behind when Chris Paul opened the scoring for the Spireites relegation rivals.
But Will Evans equalised before Boden bagged his second is as many games.
Victory at WestLeigh Park lifted them to the 46-point mark and eight clear of Havant, who occupy the fourth relegation spot.
Scott Boden, with a glancing header comfortablye into the goalkeeper's hands, and Tom Denton, who side-footed wide, missed half-chances for the Spireites early on.
Havant's first attack in the 12th minute produced a goal.
It came from a wicked inswinging left-side corner from former QPR wide man Chris Paul, whose high cross ball caught up in the wind and sailed beyond Shwan Jalal's reach into the top right-hand corner.
That was effectively Havant's only chance of the half - Chesterfield bossing the midfield and missing several opportunities to equalise.
Despite his towering presence, Denton twice failed to hit the target with close range headers, while teenager Joe Rowley saw a shot beaten out.
Chesterfield had an escape in first half stoppage time when Havant's Alfie Rutherford, being watched by Southampton scouts, cut in from the left, drilled a low ball across the face of the goalmouth, without a team-mate getting a touch.
Manager Sheridan would have been content to see Chesterfield turn round only one goal behind as the elements were certainly in their favour after the break.
It took the Spireites seven minutes to equaliser - and it came from a set piece.
Havant conceded a rather unnecessary free-kick some 35 yards out on the right and Bradley Barry picked out Will Evans a treat - the Chesterfield skipper burying a header into the corner to make it 1-1.
Havant almost restored their lead two minutes later - Jalal making a brilliant near post save to deny Rutherford.
Chesterfield responded with Boden having a shot saved, but in a tit for tat session Havant's Wes Fogden rifled a shot into a packed goalmouth and the visitors got it away.
But in the second minute of stoppage time Chesterfield grabbed the winner - from the penalty spot.
Havant's Dan Strugnell tripped Jerome Binnom-Williams on the left-hand side of the box and Boden drilled the resulting penalty into the corner to give Chesterfield three precious points.
In a frantic finale, Havant had strong appeals for a penalty turned down.
Havant & Waterlooville: Dudzinski Strugnell Harrison Fogden Lewis Quigley (Rose 45), M Carter (Banjo 85), Huggins Rutherford Cordner Paul
Subs: Woodford Paterson Jalloh
Chesterfield: Jalal Barry Evans Weston Weir (Binnon-Williams 54), Rowley Hollis Denton (Antoine-Fortune 80), Yarney Boden Chapman
Subs: C Carter Shaw Reid
Referee: Savvas Yianni (Somerset)