Gillingham marked Stephen Clemence's first home league game in charge with victory over Salford.
On-loan midfielder Connor Mahoney fired the hosts in front after 22 minutes when he curled his left-footed shot into the bottom corner.
Their lead lasted just 16 minutes as Salford striker Matt Smith rose above defender Shad Ogie to meet Ryan Watson's cross and head past Jake Turner.
Ammies defender Curtis Tilt almost diverted Max Clark's delivery into his own net two minutes before half-time.
Clemence's side retook the lead through Tom Nichols' first league goal of the season in the 54th minute when he guided a header home from Jonny Williams' cross.
They all-but sealed their victory shortly after the hour mark when Dom Jefferies met Cheye Alexander's looping assist to head past Salford goalkeeper Alex Cairns.
Turner produced a brilliant fingertip save to prevent Smith from scoring his second of the game and giving the visitors hope.
The Gills came close to scoring four goals in a home league game for the first time since January 2021, but Ogie's late header crashed back off the crossbar.
Match report supplied by PA Media.