Gillingham chalked up their first home win of the season to overcome a determined Accrington Stanley side at Priestfield.
Dennis Oli was the hero for the home side, turning in debutant Charlie Daniels' cross with 15 minutes remaining to score his first of the season.
Accrington came into the game off the back of two victories, but were indebted to goalkeeper Kenny Arthur early on as he pushed away Mark McCammon's header from John Nutter's 10th minute corner.
And minutes later Arthur managed to deflect Simeon Jackson's shot away for a corner after the striker had wriggled away from his marker, Phil Edwards.
The visitors remained a threat however and caused a major scare two minutes before the interval when the on-loan Jamie Clarke left defender Garry Richards for dead, before Barry Fuller intervened with a strong challenge that had Accrington appealing for a penalty.
John Coleman's men were back defending in the second half with Gillingham substitute Gary Mulligan proving a far more effective foil for Jackson than the replaced McCammon.
After Jackson and skipper Andrew Crofts had both gone close with efforts, Mulligan fired home from the edge of the area only for referee David Philips to penalise Jackson for leaning into his man.
Accrington clearly needed to act and threw on David Worrall and Robbie Williams in a bid to turn the tide.
And in the 76th minute the visitors should have gone in front, but talisman Paul Mullin headed a glorious chance wide from Chris King's left-wing cross.
Gillingham proceeded to pepper the Accy goal with a series of chances with Arthur clawing away a Crofts header, before Mulligan blazed two gilt-edged chances wide.
But the goal finally came when Oli sneaked in at the near post to divert Daniels' cross beyond Arthur with Jackson making sure right on the line.