Curtis Woodhouse booked Peterborough's FA Cup second round place with a last -gasp header that shattered Tranmere Rovers' hopes of hanging on for a replay With both sides down to 10 men, a second meeting looked on the cards until home skipper Woodhouse steered the ball wide of goalkeeper John Achterberg after a pin-point pass from teenage substitute Ryan Semple.
Set-piece goals at either end provided the high spots of a lively opening half, Peter Kennedy drawing first blood for Posh with an 11th minute left-foot free-kick into the top corner after a foul on Clive Platt a yard outside theTranmere penalty area.
Achterberg denied Kennedy a second with a fine save after Sagi Burton headed back a David Farrell centre, and the big Dutchman also did well to get across to a Platt header when Andy Legg whipped in a long throw.
Defender Ryan Taylor moved up to blast Tranmere level three minutes before the break, sending a 20-yard free-kick soaring into the roof of the net to make Posh pay a heavy price for a foul by Woodhouse on Mark Rankine.
Kennedy brought the best from Achterberg in the first half added time, but there were fewer openings in the second period and the fireworks came in midfield when Rovers forward Calvin Zola clashed with home defender Burton.
Referee Neil Miller send both off, Zola with a straight red while Burton, cautioned earlier, walked after getting a second yellow card.
Tranmere might have grabbed a late winner when Gareth Roberts burst forward but Posh goalkeeper Mark Tyler advanced to make a crucial save in a one-on-one situation. Then Chris Plummer forceed Achterberg into action before Woodhouse had the last word.