Gillingham suffered a setback in their pursuit of the League 2 title after losing to Exeter City at Priestfield on Tuesday night.
The Gills took a fourth-minute lead through Chris Whelpdale but Alan Gow’s free-kick and Jamie Cureton’s close-range effort in the second half put Exeter 2-1 ahead.
A screamer from Danny Jackman levelled it up again late on, but Cureton gave Exeter the points on 87 minutes just seconds after missing a penalty.
It was only Gillingham’s third defeat of the season and the first time in the league they had conceded more than two goals in a game.
There were three changes to the starting XI for the Gills, with manager Martin Allen bringing Charlie Lee, Charlie Allen and Deon Burton into the team.
With just two minutes gone Matt Fish lobbed a shot on to the roof of the crossbar and moments later a throughball from Lewis Montrose found Whelpdale and he tucked the ball under keeper Artur Krysiak.
Lee put a header wide for the Gills but the visitors levelled things up on 27 minutes as Gow curled a free-kick into the top corner after Lee had been penalised for a foul. His booking was to cost him his place in the second half.
The Gills ended the half strong, with a couple of crosses from Jackman presenting both Burton and Ben Strevens with chances but neither could convert their headers.
Lee had also seen a glancing header cleared from the foot of the post from an Allen corner as the hosts went into the break knowing they needed to keep up the pressure in the second 45 minutes.
Strevens headed another chance wide early in the second half but it was Exeter who took the lead in the 54th minute when a corner ball found its way through a crowd of bodies and Cureton smashed it home in front of the 144 travelling fans.
Second-half substitute Myles Weston curled a shot narrowly wide on the hour after a dazzling turn left his marker rooted to the spot. Weston was causing plenty of problems down the left but the Gills were always susceptible to being hit on the break.
With 11 minutes left, and Gills facing a real challenge to get back into the game, Jackman was alert enough to pick up a stray ball and smash it home beyond Krysiak into the top corner.
There was late drama as Romain Vincelot’s foul on Jimmy Keohane led to a penalty which Stuart Nelson saved from Cureton, but just a minute later the same player headed home Liam Sercombe’s cross.
Gills attempted to hit back with a late equaliser and Whelpdale hit the bar but it was the visitors who took all three points.
Gillingham: Nelson, Fish, Jackman, Barrett, Davies, Montrose (Vincelot 60mins), Whelpdale, Allen, Lee (Weston 46mins), Strevens (Kedwell 70mins), Burton. Subs not used: Essam, Frampton, Birchall, Forecast.
Exeter: Krysiak, Tully, Woodman, Bennett, Baldwin, Coles, Sercombe, Oakley, Gow, Cureton (Chamberlain 90mins), Doherty (Keohane 84mins). Subs not used: Amankwaah, Nichols, Dawson, Evans, Taylor.
Don't miss out, subscribe today. Keep up to date with our newsletters.
A guide for your future. For year 11 students in Kent and Medway. Click here for the e-edition.
Education, Training & Childcare is a special supplement published by KM Media Group four times a year. Click here for latest e-edition.
Get the latest food and drink news, recipes from some of the nation's top chefs plus updates from Kent's vineyards and breweries.
Search in your local area to find your perfect partner in Kent, with FreshStart Dating! PLUS, register for free!.
Find out what's going on in the garden, with Kent expert Lucy Hewett's weekly update.
Buy pictures that you've seen in a KM newspaper, or send in a picture and we will place it on our photo sales website so that you can purchase a super, unique gift.