A late penalty from Cody McDonald earned Gillingham all three points at Priestfield.A double from Cody McDonald earned Gillingham all three points and condemned Peterborough United to their first Sky Bet League One away defeat of the season.
Jon Taylor tested goalkeeper Stephen Bywater inside the opening three minutes after cutting inside from the left as Posh made a bright start at a misty Priestfield.
Kyle Vassell saw a left-footed shot from the edge of the area blocked after a glorious pass from Marcus Maddison on 13 minutes.
Maddison fired well wide of the target on 17 minutes after a pass from Payne picked him out in a central area of the pitch with room to race into. A low, skidding free-kick from Taylor was saved at the second attempt by Bywater moments later.
Bywater was called upon again on 19 minutes as he denied Vassell's toe-poke after the striker's initial effort was blocked following excellent work down the left by Taylor.
Payne was cautioned by referee Mr Heywood on 23 minutes after a mistimed challenge on the pacy McGlashan. On 26 minutes, the Gills got themselves in front. Goalkeeper Alnwick initially beat away a curler from Dack, but when Norris returned the ball into the box, MCDONALD powered home a downward header from seven yards past the Posh keeper.
The lively Maddison curled a shot over with his weaker right-foot on 34 minutes after finding space in a central area as Posh continued to find good openings in the middle of the park.
Egan headed wide of the post after a Dack centre into the box on 39 minutes. Alnwick produced a stunning fingertip save moments later, flicking a Loft shot around the post.
On 43 minutes, Posh got themselves a fortunate equaliser. Jon TAYLOR collected the ball down the right, looked up and sent a cross towards the far post, the winger got a bit too much on it and it flew over Bywater and into the back of the net.
Joe Newell replaced Jermaine Anderson at the interval. Dack flashed a shot across goal on 55 minutes as the Gills got in behind the Posh back-line.
Substitute Newell cracked a sublime left-foot shot from 25-yards against the post on the hour mark, the Posh midfielder inches away from a superb goal.
Goalscorer Taylor was replaced by Kane Ferdinand on 70 minutes, the former Shrewsbury man's night ended by a crude tackle by Hessenthaler.
Dack curled a free-kick over the top after Santos was penalised for a foul. He entered the referee's book, as did Smith as the game got tetchy.
Posh made a switch up front on 77 minutes with Conor Washington replacing James. Newell saw an acrobatic volley blocked before Payne blazed over after Washington's pace had caused one or two problems for the Gills defence.
On 84 minutes, the Gills were given the chance to take the lead for the second time in the game as Burgess was penalised for handball in the box. Cody McDONALD stepped up and just about squeezed home the spot-kick despite the best efforts of Alnwick who got a hand to the effort.
Gillingham: Bywater, Martin, Egan, Hause, Loft (sub Pritchard 72min), Hessenthaler (sub Linganzi 72min), McDonald, McGlashan, Morris, Norris (sub Dickenson 79min), Dack. Unused subs: Legge, Morris, German, Davies.
Posh: Alnwick, Smith, Santos, Burgess, Baldwin, Taylor (sub Ferdinand 70min), Maddison, Anderson (sub Newell 46min), Payne, Vassell, James (sub Washington 77min). Unused subs: Grant, McCann, Brisley, McEvoy.
Attendance: 4,819 (282 Posh)