Crawley Town let slip a lead to bow out of the Johnstone’s Paint Trophy 2-1 at the hands of ten-man Gillingham.
The Reds took the lead in the 21st minute from the penalty spot taken by Izale McLeod.
Gillingham, without a win in their last nine matches, had Joe Martin sent-off after 63 minutes for raising a hand at the throat of McLeod.
But far from looking depleted the Gills rallied to score two late goals by Jermaine McGlashan on 66 minutes and Doug Loft in the 88th minute to book their place in the Area Semi-final.
Crawley made three changes to the side which was dismally knocked out of the FA Cup 1-0 at Yeovil Town on Saturday.
Striker Gavin Tomlin came in for Matt Harrold and partnered Izale McLeod in a 3-5-2 formation.
Bobson Bawling played on the right wing instead of Josh Simpson while Sonny Bradley played in central defence for Dean Leacock who was suspended.
Ryan Dickson retained his place at left back, relegating Mat Sadler to the bench in his last game on loan before returning to Rotherham.
Gillingham went into the game in search of their first win in ten matches and made four changes from their defeat to Bristol City.
They switched both their strikers, Cody McDonald through injury and Danny Kedwell who was on the bench. In place of them were Antonio German and Luke Norris.
Reds had the first chance of the game on 14 minutes when good work by Gwion Edwards and Gavin Tomlin set-up Mcleod for a shot which curled narrowly wide.
Keeping the pressure on a superb cross by Bobson Bawling on the right wing found McLeod whose header was off-target.
Crawley took the lead in the 21st minute from the penalty spot awarded when Jake Hessenthaler tripped Edwards and McLeod sent keeper Stuart Nelson the wrong way for his eighth goal of the season.
Jimmy Smith chipped the ball into the six yard box and forced keeper Stuart Nelson to push clear.
Moments later Nelson denied Gavin Tomlin’s shot from 25 yards as Crawley continued to press.
At the other end Luke Norris skillfully chipped and volleying the ball powerfully across the home goal from a tight angle.
McLeod crossed to Tomlin to the right of the area but he failed to either shoot or pass and the chance was gone. He then started to hold his leg possibly injured and later had to be taken off.
Gillingham were reduced to ten-men after 63 minutes when Joe Martin raised a hand to Izale McLeod and was shown a red card. McLeod was given a yellow card for the incident which attracted a major protest from the Gills players.
The visitors pulled a goal back within three minutes of having a man sent-off when substitute Jermaine McGlashan equalised with a neat finish.
McLeod then sent a cross in to the six-yard box to substitute Lewis Young but he could not connect and again the chance was wasted.
Bawling then sent a cross in for McLeod who was off-target with a glancing header.
McLeod tried to keep Reds’ hopes alive with a low shot which was well-saved by Nelson.
But Gillingham scored an 88th minute winner as skipper Doug Loft launched a speculative cross towards goal which deceived Jamie Ashdown and flew into the top corner.
REDS (3-5-2): Ashdown, Oyebanjo (Banya 83), Dickson (Sadler 53), Bradley, Edwards, Smith, McLeod, Walsh, Keane, Bawling, Tomlin (Young 60).
Unused subs: Jensen, Henderson
GILLINGHAM (4-4-2): Nelson, Fish (Dack 46), Martin, Egan, Legge, Loft, Hessenthaler, German (Kedwell 75), Norris (McGlashan 46), Doughty, Dickenson.
Unused subs: Morris, Hoyte
REFEREE: Darren Sheldrake
ATTENDANCE: 1,305 (away 310)
MAN OF THE MATCH: Izale McLeod