Gillingham were beaten in the final minute by League 1 leaders Leyton Orient.
The Gills were leading 1-0 at the break but conceded twice after the turnaround.
Adebayo Akinfenwa headed the Gills infront with just three minutes gone and a penalty save from keeper Stuart Nelson kept the lead intact.
Marvin Bartley headed Orient level in the second half and in the final minute substitute Yohann Lasimant scored a winner.
Injuries again forced manager Peter Taylor’s hand, as he had to make do without Myles Weston (hamstring). Back into the starting XI went Charlie Lee.
The visitors included former Gills loan players Kevin Lisbie and Romain Vincelot in their team, along with striker Shaun Batt, whose hat-trick in November at Priestfield ended the Blues’ interest in the Johnstone Paint’s Trophy.
But it was former Orient striker Akinfenwa who had the biggest smile in the opening stages, as his looping header beat keeper Jake Larkins with just three minutes on the clock, as he got on the end of Jake Hessenthaler’s corner.
That corner had been conceded as the visitors made a desperate scramble to clear the ball after Cody McDonald had headed an effort against the post.
Moments later Hessenthaler drove a low shot at goal but saw rookie keeper Jake Larkins make a save. Larkins was making his Football League debut after an injury to O’s regular goalie Jamie Jones.
Orient had the chance to make it all-square midway through the half, when Leon Legge downed Lisbie in the area but Nelson – another player facing his former team – guessed right and saved well to deny Elliott Omozusi.
The Gills continued to look dangerous on the break and were causing Orient problems with set-pieces, boosted by the return of long-throw specialist Lee to the team.
Orient’s hopes of getting back into the game were dealt a blow when Batt limped off injured, just before the break, as he slipped while trying to evade a tackle from Adam Barrett.
Cody McDonald should have doubled Gillingham’s lead early in the second half, but he dragged his shot wide, after racing clear onto a ball from Hessenthaler.
The Gills kept Orient at arm’s length for much of the second half but with 70 minutes gone, they levelled, as a corner kick was headed home by Bartley. He ran in unopposed to power the ball past Nelson into the centre of goal.
With 11 minutes left Nelson dived full stretch to deny Dean Cox and moments later also did well to deny Orient’s Robbie Simpson.
Legge had to hack an effort off the line with two minutes left. Sub Yohann Lasimant found the target after a ball over the top caused all sorts of problems for the Gills.
In the final minute Michael Harriman got another effort off the line but with the Gillingham defence in disarray in came Lasimant to power home a header.
Gillingham: Nelson, Harriman, Martin, Barrett, Legge, Gregory, Hessenthaler, Dack (Fagan 55mins), Lee, Akinfenwa (German 62mins), McDonald (Kedwell 81mins). Subs not used: Howard, Davies, Allen, Daniels.
Leyton Orient: Larkins, Omozusi, Vincelot, Cuthbert (Sawyer 71mins), Baudry, Cox, Lisbie (Lasimant 86mins), Odubajo, Batt (Simpson 41mins), Clarke, Bartley. Subs not used: Lee, Gorman, Ling, Grainger.