Swindon Town captain Christian Roberts scored with a penalty two minutes from the end of normal time to dash the hopes of Conference Club Morecambe, who had come desperately close to a deserved replay.
Morecambe had the better chances and were unlucky even not to have taken the lead on two occasions.
But their hearts were broken in a rare Robins attack.
Shrimps defender Michael Howard brought down Town substitute Lucas Jutkiewicz and referee Paul Taylor had an easy decision to make.
Roberts stepped up to send goalkeeper Steven Drench the wrong way with his spot-kick.
Even then there were some anxious moments for Swindon and Michael Twiss had the ball in the Swindon net only for it to be ruled out for a foul and Swindon hung on for their fourth successive win.
Town owed a big debt to goalkeeper Phil Smith, who made two outstanding saves, one of them from his own defender Curtis Weston.
Smith's first save in the 26th minute saw him deny Adriano Rigoglioso with a smart save to his right at the foot of the post.
But his best effort came in the 29th minute when Smith made a brilliant reflex save on his line to stop Weston turning in a low centre from Howard.
Morecambe goalkeeper Drench did not have a save to make until the 52nd minute, even then he had no trouble in gathering a hopeful shot from Ricky Shakes.
Swindon defender Jerel Ifil was booked for a foul on man of the match Gary Thompson and from the free-kick on the edge of the area Rigoglioso shot narrowly wide.
After Swindon's penalty Howard was booked for dissent and referee Taylor added on four minutes but Morecambe could not snatch a replay.
Referee Taylor had a busy afternoon, booking goal hero Roberts for a foul on Fraser McLachlan, a minute before Morecambe defender Jim Bentley was shown a yellow card for dissent.
Weston was the other player to be booked, for a foul in the 82nd minute as Swindon desperately attempted to up the tempo in search of a winner.