Crewe threw away the opportunity of extending their lead over Cardiff when substitute Leon McKenzie caught them out with an injury-time winner.
An inspired substitution from Posh boss Barry Fry saw him introduce Leon McKenzie and Jason Lee with 18 minutes left of a dour struggle.
The pair combined to bring the visitors close to the winner within five minutes of their arrival, but McKenzie steered his shot the wrong side of the post.
And McKenzie wriggled free to hit the only goal of the game deep into injury-time after taking Gareth Jelleyman's pass and drifting away from home centre half Richard Walker.
The striker, who was returning from a lengthy injury lay-off, tucked his shot underneath Clayton Ince's dive into the far corner of the net to stun the home crowd who had been expecting a comfortable passage for the second-placed side.
That should have been the case if they had continued in the same vein as after the break when Rodney Jack latched on to Walker's long ball out of defence and drilled a shot from right of the box, which came back off the inside of the far post into keeper Lee Harrison's hands.
The Posh keeper inexplicably let Jack's pass aimed for Steve Jones slip through his hands minutes later and he was grateful when Simon Rea got back to protect the goal and deflect the winger's shot off the line.
Rob Hulse had an effort also kicked off the line by Mark Arber and Harrison came out to make a vital blocking save as Jack broke through on the left of the box.
But Peterborough refused to wilt and came back into the contest with the same sort of workmanlike football which had given them a fighting chance in the first half.
Then veteran Andy Clarke and Sagi Burton wasted good chances as Crewe really struggled to take the initiative.
Clarke pulled an effort wide from an inviting position and Burton dollied a header onto the roof of Ince's net after the ball bounced invitingly just outside the six-yard box from a corner.