Match ends, Gillingham 1, Oldham Athletic 2.
Ryan Flynn's 87th-minute strike saw Oldham snatch victory at Gillingham.
Cody McDonald had given the Gills a half-time lead, but goals after the break from Freddie Ladapo and Flynn earned Oldham their first league win since August.
McDonald was the beneficiary of a superb inswinging corner by Bradley Dack and nodded in unmarked at the back post after 10 minutes.
He should have had his second in the 26th minute but his glancing header went straight into the arms of Connor Ripley.
Ladapo, on as a substitute on the hour-mark, scored with his first touch five minutes later, slamming a shot from 12 yards past Stuart Nelson.
But Oldham were not content to settle for just a point and former Liverpool player Flynn earned a much-needed win for manager Steve Robinson.
The midfielder pounced on a loose ball following a deflected Paul Green shot and slotted into an empty net.
The goal capped a remarkable comeback from the team who started the day bottom of the league.
Reports supplied by the Press Association.
- 1NelsonBooked at 90mins
- 4HerdBooked at 62minsSubstituted forJacksonat 69'minutes
- 7WagstaffBooked at 19minsSubstituted forByrneat 81'minutes
- 23DackBooked at 38minsSubstituted forOsadebeat 66'minutes
- 45NoubleBooked at 68mins
- 10WinchesterSubstituted forCroftat 59'minutes
- 9MckaySubstituted forLadapoat 61'minutesBooked at 65mins
- 19ErwinSubstituted forBanksat 90+3'minutes
- Kevin Johnson
- Shots on Target
Second Half ends, Gillingham 1, Oldham Athletic 2.
Foul by Lee Croft (Oldham Athletic).
Josh Wright (Gillingham) wins a free kick in the defensive half.
Corner, Oldham Athletic. Conceded by Paul Konchesky.
Substitution, Oldham Athletic. Oliver Banks replaces Lee Erwin.
Foul by Josh Wright (Gillingham).
Lee Croft (Oldham Athletic) wins a free kick in the attacking half.
Foul by Mark Byrne (Gillingham).
Jamie Reckord (Oldham Athletic) wins a free kick in the attacking half.
Stuart Nelson (Gillingham) is shown the yellow card.
Goal! Gillingham 1, Oldham Athletic 2. Ryan Flynn (Oldham Athletic) right footed shot from the centre of the box to the bottom left corner.
Attempt saved. Emmanuel Osadebe (Gillingham) left footed shot from the left side of the box is saved in the bottom left corner.
Attempt saved. Paul Green (Oldham Athletic) right footed shot from the centre of the box is saved in the centre of the goal.
Attempt missed. Lee Erwin (Oldham Athletic) left footed shot from outside the box is too high.
Corner, Oldham Athletic. Conceded by Max Ehmer.
Attempt blocked. Lee Erwin (Oldham Athletic) right footed shot from outside the box is blocked.
Foul by Emmanuel Osadebe (Gillingham).
Peter Clarke (Oldham Athletic) wins a free kick in the attacking half.
Corner, Gillingham. Conceded by Peter Clarke.