Peterborough claimed a stoppage-time winner at Bury to snatch a 1-0 victory and move into the League One play-off places.
Posh had the better of the first half while rock-bottom Bury dominated proceedings after the break.
But Jack Marriott stunned the hosts at the death to give Steve Evans his second win in two games as Posh boss.
Bury's Jay O'Shea fired wide early on but Posh replied with Marriott having a shot saved by Connor Ripley.
George Miller then tested visiting keeper Jonathan Bond but Posh finished the half strongly.
Marriott's goal-bound strike was blocked by Peter Clarke before Ripley kept out a Danny Lloyd shot.
Bury regrouped at half-time and within three minutes of the restart Greg Leigh crossed for Neil Danns and his close-range header was gathered by Bond at the second attempt.
The Shakers remained on top, with Danny Mayor and Rohan Ince firing wide before Bond denied O'Shea and Clarke.
But Marcus Maddison played in Marriott, who lobbed Ripley to leave Bury nine points from safety.
League One News
Ipswich and Plymouth pay tribute to Paul Mariner
Two of Paul Mariner's former clubs come together for a minute's applause ahead of kick off.
Newcastle's FA Cup shocker as League One Cambridge claim superb win
Newcastle United suffered a humiliating 1-0 home defeat by third-tier Cambridge United on a day of FA Cup shocks in the third round.
Manchester United first-team coach Kieran McKenna takes over at League One Ipswich Town
Manchester United first team coach Kieran McKenna has been appointed manager of League One Ipswich Town, the club said on Thursday.
Bristol Rovers manager Joey Barton charged with assault after woman injured
Joey Barton is due to appear in court on Monday after he was charged with assault by beating, the Metropolitan Police said.
USMNT great Landon Donovan takes role with League One club Lincoln City
USMNT great Landon Donovan will join English club Lincoln City as a strategic advisor as part of a new investment deal.
Kenny Dougall fires Blackpool back into Championship
Kenny Dougall's two excellent strikes were enough to secure Blackpool promotion back into the Championship.