Hartlepool moved into the top half of League One with their third win on the trot as they hammered former boss Neale Cooper's Gillingham.
They hit the woodwork twice and saw Gills keeper Tony Bullock make a couple of fine saves as they spent most of the game, especially in the second half, on the attack.
The home team were full value for their one-goal lead at the end of an entertaining first half.
But they had to survive a Neil Harris header and a Matthew Jarvis shot, both of them off target before Pools jumped in front on 15 minutes.
Gillingham struggled to get the ball away and when Tony Sweeney picked up a clearance and sent in a shot, Jon Daly controlled it in front of goal and lobbed his shot over Bullock into the net.
But the Gills weren't giving up and with veteran Andy Hessenthaler driving them on in midfield, they came back well.
Home keeper Dimi Konstantopoulos came to his side's rescue twice towards half-time, going down sharply to make clean saves from shots by Mike Flynn and Jarvis.
Sweeney's header was pushed on to the bar by Bullock early in the second half, but the same player swept in a 15-yard shot for the second on 49 minutes after a cross from Eifion Williams.
Michael Nelson hit the post with a diving header as the home pressure increased and they got their reward on 84 minutes when Lee Bullock glanced in a fine header after a corner from skipper Richie Humphreys, who was playing his 200th league game for the home side.
Sub Francis Collin hammered in a 25-yard shot for Gillingham's consolation goal in the last minute, but it was far too little and far too late.