Craig Mackail-Smith's late strike broke the hearts of Ryman Premier outfit AFC Hornchurch and ensured Peterborough marched on to the second round of the FA Cup.
Predictably it was the League One high fliers who made the early running with Dominic Green forcing home keeper Dale Brightly in to action with a dangerous free kick in the second minute.
Hornchurch's first opportunity arrived in the ninth minute as Kris Lee found half a yard in the box only to fire over after Peterborough had failed to clear a corner.
The dangerous George Boyd then had a shot cleared off the line for the visitors before the non-league side had a goal chalked off after Dean Green was adjudged to have handled Lee's cross over the line.
In an open second half Dean Green headed a good opportunity over the crossbar after good work from ex-Spurs midfielder Mark Janney before Posh substitute Mackail-Smith was denied by Brightly after racing on to an Aaron McLean flick.
The ever-dangerous Dean Green was denied by a brilliant save from England under- 21 keeper Joe Lewis in the 81st minute after the striker had raced on to a long ball and struck a sweet half volley from the edge of the box.
But there was to be a late twist in the tale as Brightly spilt a seemingly straightforward Boyd strike from the edge of the box and Mackail-Smith was on hand to tuck home the rebound.
Posh will now face either Accrington Stanley or Tranmere in the next round.
Football Results
Team Bath 0-1 Forest Green A Second-half goal from Kaid Mohamed was enough to send Forest Green in to the second round of the FA Cup following their 1-0 victory over dominan...
Havant and W 1-3 Brentford Goals from Marvin Williams, Charlie MacDonald and Nathan Elder ensured Brentford avoided an FA Cup upset at the home of Blue Square South side Hav...
Carlisle 1-1 Grays Athletic Gary Madine saved Carlisle's blushes with an equaliser seven minutes from time to earn a 1-1 draw against Blue Square Premier strugglers Grays
Milton Keynes Dons 1-2 Bradford Graeme Lee fired a late free-kick to ensure Bradford booked their place in the second round of the FA Cup courtesy of a 2-1 win at MK Dons
AFC Telford 2-2 Southend Jon Adams` brace was enough to earn AFC Telford a deserved replay as Jean-Francois Christophe spared Southend's blushes in a 2-2 draw
Aldershot 1-1 Rotherham Aldershot striker John Grant showed nerves of steel to keep his team in the FA Cup as his 93rd-minute penalty earned a 1-1 draw with Rotherham
Eastbourne Borough 0-0 Barrow Eastbourne and Barrow will meet for an FA Cup first-round replay after playing out a goalless draw at Priory Lane
Bury 0-1 Gillingham Andy Barcham struck the decisive goal to send Gillingham into the second round of the FA Cup with a 1-0 win at Bury
Oxford Utd 0-0 Dorchester Oxford spurned an avalanche of chances as they were held to a goalless draw against non-League minnows Dorchester
Leiston 0-0 Fleetwood Town Fleetwood survived the final 27 minutes with ten men following the dismissal of defender Nathan Pond to claim a 0-0 draw with Leiston