Ten-man Mansfield needed a penalty shoot-out to see off plucky Slough to reach the second round of the FA Cup.
Jake Speight scored the decisive penalty after Ollie Burgess and Sean Sonner missed for the hosts.
The Stags led when Slough defender David Woozley diverted Anthony Howell's cross into his own goal, before Nathan Bowden-Haase header from close range forced the game into extra-time.
Mansfield had captain John Dempster sent off for a foul on Edward Smith.
The Stags should have won it in normal time, but Speight, Louis Briscoe and Lindon Meikle were all guilty of missing good chances in the closing stages.
Rebels' defender Dominic Rhone had earlier seen his first-half goal ruled out for offside.
Chris Clements, Louis Briscoe and Matt Rhead all scored from the spot before Speight's match-winner. Stuart Swift successfully slotted his penalty for Slough.
Evo-Stick South League Division One Central side Slough were the lowest-placed club left in the Cup.
Mansfield will play fellow Conference Premier side Lincoln City in the second round after they
VIEW FROM THE DRESSING ROOM:
Slough Town manager Steve Bateman told BBC Radio Berkshire:
"It's never a nice way to lose any competition.
"We've matched them over two games. I'm pleased for the players because at half time tonight we were disappointed not to have got on the ball and asked a few more questions.
"In the second half we've got into them a lot more and in extra time it could have gone either way.
"It's a desperate way to lose but I am proud of the players and they can hold their heads high because they've matched a full time team. I felt for the players because they deserved to go through and were outstanding."