Jake Forster-Caskey scored two penalties in extra-time to seal a 4-2 win at Swindon and move Brighton into the third round of the Capital One Cup.
Former Chelsea youngster Rohan Ince scored the opening goal for the Championship side after 10 minutes with a stunning 20-yard right-foot volley from a perfectly weighted Adrian Colunga pass.
However, Louis Thompson bagged a deserved equaliser for League One Swindon seconds after half-time when he guided a Massimo Luongo pass past Seagulls goalkeeper Casper Ankergren.
Lewis Dunk then hit the bar for the visitors after 55 minutes - but that was the closest either side came to sealing the tie in full-time.
The game changed in the 93rd minute when former Brighton man George Barker went off with a shoulder injury for the home outfit, with all three substitutes used.
Three minutes later Colunga turned in an Adam Chicksen cross from three yards for a debut goal, before being fouled by Jordan Turnbull to win a penalty which Forster-Caskey despatched in the 99th minute.
But Mark Cooper's Wiltshire side were not done and another former Seagull, Yaser Kasim, scored a fantastic solo goal in the 113th minute, charging into the box and slotting past Ankergren to set up a tense finale.
Forster-Caskey converted his second goal in the dying seconds though, beating Wes Foderingham from the spot after Nathan Thompson had fouled him in the box and been sent off.