League Two side Torquay booked a spot in the second round of the FA Cup with victory at League One Chesterfield.
Danny Stevens bundled in Eunan O'Kane's cross to put the Gulls ahead, but the hosts levelled as Jordan Bowery headed in Craig Westcarr's cross.
Torquay, who have now won four matches in a row, regained the lead when Rene Howe went round keeper Ole Soderberg.
They sealed victory late on when Kevin Nicholson curled a 25-yard free-kick over the wall and into the net.
VIEWS FROM THE DRESSING ROOM
Chesterfield manager John Sheridan told BBC Radio Sheffield:
"I apologise to the fans again for the performance. We shouldn't be getting beaten against a team in a lower league than us in this competition.
"I think we were good enough to win the game but we didn't show anything and that's probably the worst I've ever felt as a manager.
"The amount of goals we're conceding, it's like some of the players have never played before and I've never coached a team before, so I'll take responsibility and I hope the players take responsibility as well.
"I totally understand the frustration. I don't mind people being frustrated because the way we're playing at the moment we are frustrating some people. So we take everything and we've got to stand up and be counted."
Torquay United manager Martin Ling told BBC Radio Devon:
"The goals are coming from all areas which is good.
"Everything that we did today went well and confidence is running through us really highly.
"We've had a great run, four wins on the trot. We're in the second round of the FA Cup, won a little bit of prize money, and let's hope we get a nice draw to see if we can get in the third round and then pull out that big fish."