Match ends, Gillingham 2, Peterborough United 1.
Cody McDonald's 50th Gillingham goal condemned high-flying Peterborough to their first away defeat of the season.
The striker gave the Gills the lead by heading home Jake Hessenthaler's cross.
A fluke goal from Jon Taylor levelled the game on the stroke of half-time, when a cross-turned-shot looped in over on-loan Gills keeper Stephen Bywater.
Joe Newell hit a post for the visitors, but McDonald won it by converting from the penalty spot four minutes from time after Christian Burgess handled.
Gillingham move to within two points of the play-off places, while Peterborough still lie second but are now four points behind leaders Bristol City.
- 8HessenthalerBooked at 69minsSubstituted forLinganziat 73'minutes
- 7LoftSubstituted forPritchardat 73'minutes
- 19NorrisSubstituted forDickensonat 80'minutes
- 22Almeida SantosBooked at 76mins
- 2SmithBooked at 75mins
- 21BurgessBooked at 85mins
- 8PayneBooked at 24mins
- 15AndersonSubstituted forNewellat 45'minutes
- 7TaylorSubstituted forFerdinandat 70'minutes
- 9JamesSubstituted forWashingtonat 77'minutes
- Mark Heywood
- Shots on Target
Second Half ends, Gillingham 2, Peterborough United 1.
Joe Martin (Gillingham) wins a free kick in the attacking half.
Foul by Marcus Maddison (Peterborough United).
Attempt missed. Christian Burgess (Peterborough United) header from the centre of the box misses to the left.
Foul by Joe Martin (Gillingham).
Kane Ferdinand (Peterborough United) wins a free kick on the right wing.
Goal! Gillingham 2, Peterborough United 1. Cody McDonald (Gillingham) converts the penalty with a right footed shot to the top right corner.
Christian Burgess (Peterborough United) is shown the yellow card.
Penalty conceded by Christian Burgess (Peterborough United) with a hand ball in the penalty area.
Joe Martin (Gillingham) wins a free kick in the defensive half.
Foul by Kyle Vassell (Peterborough United).
Attempt missed. Jack Payne (Peterborough United) right footed shot from the centre of the box is just a bit too high.
Substitution, Gillingham. Brennan Dickenson replaces Luke Norris.
Foul by Josh Pritchard (Gillingham).
Michael Smith (Peterborough United) wins a free kick in the defensive half.
Substitution, Peterborough United. Conor Washington replaces Luke James.
Attempt missed. Bradley Dack (Gillingham) right footed shot from outside the box is just a bit too high from a direct free kick.
Ricardo Santos (Peterborough United) is shown the yellow card.
Amine Linganzi (Gillingham) wins a free kick in the attacking half.