Two goals in nine minutes gave Gillingham some breathing space from the relegation places with a 2-1 win over Accrington.
Stanley were unbeaten in nine games at home but second-half goals from Charlie Kelman and Vadaine Oliver moved the Gills four points clear of the bottom four.
Goalmouth action was in short supply in the first half with the best chance in the first minute when Colby Bishop fired straight at former Accrington goalkeeper Aaron Chapman.
The game burst into life after the interval.
Chapman produced three superb saves to keep out a Bishop overhead kick, deny Korede Adedoyin when he was clean through and spectacularly palm away a Harry Pell header.
Gillingham took the lead after 64 minutes when Oliver’s effort was tipped away by teenage debutant keeper Liam Isherwood but came to Kelman at the far post and he headed home.
It was two in the 73rd minute when a corner was only half-cleared and it was put back in by Dan Phillips with Oliver jumping with Isherwood and heading home his 10th of the season.
The Reds were awarded a penalty in the first minute of stoppage time for a foul on Harvey Rodgers and Bishop stroked the ball home, but the Gills held out for an important win.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.