Steve Evans masterminded a super success for Gillingham then tipped beaten Peterborough to go up.
The former Posh chief enjoyed a triumphant return to the Weston Homes Stadium as Connor Ogilvie fired the Gills to a 1-0 win to keep their slim play-off hopes alive.
The full-back produced a fine finish from the edge of the box in the 15th minute to inflict only a third home defeat on Darren Ferguson’s high-fliers who remain seven points clear of third-placed Sunderland, who drew at leaders Hull, in the race for automatic promotion.
Sammie Szmodics was millimetres away from a stunning leveller for Posh when his long-range volley slammed against the bar early in the second half.
League One top-scorer Jonson Clarke-Harris then blazed over before substitute Ethan Hamilton wasted a glorious chance to rescue a point deep into stoppage time.
A delighted Evans said: “The boys were terrific just as they were at Oxford on Saturday bar a bad 10 minutes at the end.
“I’ve never seen a group of players as disappointed in a dressing room as they were after that game, but we’ve picked them back up.
“We knew we would have to produce one of the best, if not the best, performances of the season against Peterborough, whose home form is incredible.
“Connor’s finish was brilliant on his so-called weaker foot and we’re all delighted for him after two or three games where he wasn’t quite himself.
“I don’t think I could single one player out as everyone was outstanding.
“I’m a fan of Peterborough and I desperately hope they are playing Championship football next season.
“Darren is getting the best out of them and they will get promoted regardless of what happened tonight.
“But this win means our supporters can continue to dream and we will carry on fighting for them.”
Posh boss Ferguson criticised his side’s slow start.
He said: “We can’t start games in the way we did tonight against any team – let alone one who want to make things difficult by getting the ball forward – and we have been guilty of that far too often this season.
“It is really unlike us not to score. We had 19 shots, but only two on target. We also got five balls into the six-yard box without any return.
“We had some really good opportunities and the one for Ethan at the end was a huge chance.
“There is no getting away from the fact it is a disappointing result, but we have to remain calm.
“We weren’t interested in other results tonight. All that matters is we are still in a good position with four difficult games to go.
“The first of those is at Charlton on Saturday and we have to ensure we are ready to go again.”