Eastbourne Borough were made to struggle by County League division two minnows Mile Oak before the Blue Square Premier side scrambled to a 4-3 win.
Borough got the Sussex Senior Cup tie off to a great start with Mo Harkin converting Pat Armstrong's cross inside 41 seconds.
And Priory Lane fans were even happier when that lead was doubled on 23 minutes as Simon Wormull slotted home Nathan Crabb's low cross from the right.
But poor Borough defending allowed Mile Oak to get back into the game in the 32nd minute when Danny Curd's shot from an acute angle was deflected into his own net by Wormull.
The visitors were on level terms in the 55th minute when Ben Austin was penalised on the edge of the box and Chris Paine's free-kick found the net via the post.
The visitors took a shock 3-2 lead on 66 minutes, Titus Patterson's spectacular 30-yarder catching out Chris Winterton in the Borough goal.
But Eastbourne blushes were spared when Nathan Crabb tapped home an 82nd minute equaliser after Andy Atkin's header had hit the woodwork.
Two minutes later Wormull slotted in the winner from the penalty spot after Harkin had been fouled to earn Borough a visit to Worthing in the next round.
Curd might have grabbed an equaliser for Mile Oak, but slipped with only Winterton to beat.
There were no such problems for Eastbourne Town who won their Ryman League division One South game at Crowborough 3-0.
All the goals came in the first half through Jamie Salvidge, Liam Baitup and Danny Leach.
See Friday's Eastbourne Herald for full reports.
Click on the green icon to hear Garry Wilson in conversation with Andrew Raeburn