A last minute Scott Davies 20-yard drive gave Aldershot Town all three points against promotion contenders Gillingham.
After a fluid passing move by the home side on eight minutes Gills fans would be forgiven for thinking their side might be facing another drubbing.
Simon Royce produced a good save after Ben Harding rounded off the move with a 25-yard shot.
On 13 minutes Gillingham found themselves on the back foot after Mark McCammon was shown a straight red card for his challenge on Nikki Bull.
They responded to the setback on the half-hour mark when John Nutter's floated cross was met by Mark Bentley's head, fortunately for Aldershot the post intervened.
Moments later Curtis Weston missed a gilt-edged chance when he failed to hit the target with Bull stranded.
On 32 minutes John Grant hit the post after a good move with Harding inside the penalty box.
In injury time a goal-line clearance from Simon King stopped Louis Soares getting on the scoresheet.
On 52 minutes Grant passed tamely at Royce with time and space in the inside area.
In the 67th minute Simeon Jackson outpaced Junior Osborne to fire low from ten yards, forcing a good save from Bull.
Aldershot responded moments later when Royce clawed away Davies' 25-yard drive.
With 15 minutes left, Kirk Hudson combined with Grant before flicking the ball home from nine yards to break the deadlock.
Jackson then pulled Gillingham level six minutes from time when he got between Anthony Charles and Bull to head home from five yards.
With the game heading for a draw, Davies' deflected drive beat Royce to earn the Shots another three points against one of League Two's big guns.