Top scorer Aaron Drinan struck in stoppage time to clinch a 2-0 home win for second-placed Swindon over Gillingham.
Ryan Tafazolli had opened the scoring for the Robins, who secured a fourth win in five league games.
The visitors had the better of the early exchanges, with Ethan Coleman flashing a header over from Aaron Rowe’s cross before the latter fired wide from a corner.
The forward then blitzed through a mass of defenders and struck a fierce shot that goalkeeper Connor Ripley blocked with his chest.
Tafazolli broke the deadlock in the 59th minute when he glanced in Finley Munroe’s free-kick and Will Wright then went close with a low free-kick.
The Gills nearly equalised when a throw-in got all the way to the Town goal line but Coleman’s header was tipped over by Ripley.
From the corner, Robins old boy Jonny Williams saw his header superbly saved by the keeper.
Munroe then robbed Elliott Nevitt as he bore down on the busy Ripley before visiting sub Jonny Smith rattled a post.
But Town ended the contest when Ollie Palmer’s deep cross was finished by Drinan in added time to keep Swindon firmly in the promotion hunt.
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.