Russell Penn's late effort finally killed off non-league Luton as high-flying Cheltenham booked their place in the third round of the FA Cup with a 4-2 triumph at Kenilworth Road.
The Robins twice took the lead through top scorer Darryl Duffy, who was sent off late on for foul and abusive language, and Marlon Pack but twice the Hatters pegged them back - Aaron O'Connor with both goals.
Luke Summerfield's fine effort from outside the box edged the visitors ahead again before Penn settled matters in the 93rd minute and ensured Town, currently third in League Two, chalk up a fourth straight win.
It took the visitors just two minutes to go ahead - Scott Brown's goal kick evading everyone as Duffy crept in to slot past Kevin Pilkington.
But Luton's endeavour paid off as a sublime run and cross from Robbie Willmott set up O'Connor, who finished smartly in off the far post after 40 minutes.
The Robins edged back ahead on the stroke of half-time as Pack jinked his way into the box before firing through a crowd of players. Yet O'Connor levelled again with fizzing drive just after the break.
Summerfield let fly with a stunning first-time strike after 64 minutes which put the visitors back in front and, despite Duffy's late red, Penn put the gloss on the victory when he rounded off an impressive counter-attack.