Substitute goalkeeper James McEwan raced upfield to win a vital header before Josh Simpson fired an added time Peterborough leveller in an eight-goal London Road thriller against Cardiff City.
Posh trailed by four goals at the break after Cardiff appeared set to put their promotion bid back on track following a shock Boxing Day home setback against Plymouth.
Peter Whittingham pulled the strings as Cardiff took control and apart from claiming his 13th goal of the campaign with a soaring 25-yard free-kick to give City a four-goal advantage after only 38 minutes, the former Aston Villa midfielder hit a post after just four minutes before having a hand in two goals.
Whittingham provided the low cross for Joe Ledley to fire in a fourth minute left-footer for his first of the season - and one became two on 23 minutes when Ledley jumped unchallenged at the far post to head in a Whitingham corner.
Posh offered little in attack apart from a shot by George Boyd that flashed wide, and their deficit became three when Jay Bothroyd jinked past two tame challenges and sent a 20-yard shot wide of goalkeeper Joe Lewis.
Home boss Mark Cooper rang the changes at the break and one of his substitutes Simpson, on loan from Blue Square outfit Histon, who replaced transfer-listed Aaron McLean, touched in a Craig Mackail-Smith centre to claim a first league goal after 52 minutes.
Posh lost Lewis with a back injury just past the hour but clawed back another goal six minutes later with Charlie Lee stabbing in from six yards after Boyd's storming run.
Cardiff were glad of Dave Marshall's safe hands, the Scotsman making two fine saves before Boyd took the game to the wire, blasting his 12th goal of the season with a minute of normal time left.
With the Cardiff goal under siege and Chris Whelpdale about to take a 93rd minute throw, boss Cooper urged Lewis' replacement McKeown upfield and the young keeper's extra man made all the difference before Simpson netted.