Goals from Andre Gray and Alex Lawless were enough to book Luton's place in the FA Cup third round with a 2-1 triumph despite a late rally from Dorchester at Kenilworth Road.
The Blue Square Bet Premier side looked to be cruising after goals either side of half-time from Gray and Lawless against their Blue Square Bet South opponents.
However, Arran Pugh's 71st minute header rekindled the Magpies' hopes and Luton goalkeeper Mark Tyler needed to be at his best to ensure the home side's progression.
Dorchester's first chance came when Nathan Walker headed down for Mark Jermyn but the Magpies' skipper could only shoot over.
Scott Rendell curled a shot wide in the 15th minute and Lawless headed over at the back post 10 minutes later for Luton as the hosts began to assert themselves.
The Hatters took the lead after 29 minutes when Gray beat the off-side trap and raced clear before firing past Jason Matthews from 10 yards.
Luton extended their lead in the 68th minute when Lawless fired across goal and into the bottom corner.
However, Dorchester set up a grandstand finish when Arran Pugh headed in from a corner three minutes later to hand the Magpies a lifeline.
And Ben Watson, Sam Malsom and Jake Gosling were all denied by Luton goalkeeper Tyler as the visitors threatened to draw level.