The New Saints needed extra time against Cardiff Grange Harlequins to squeeze into the Welsh Cup semi-finals.
Matty Williams and Alex Darlington struck late on to save Saints' blushes.
The Welsh League Division Three side almost produced a shock, Omar Abdillahi firing straight at keeper Paul Harrison in the last minute of normal time.
"Credit to them, they were a decent team," said Saints boss Mike Davies. "It wasn't the performance we wanted, but we're through to the next round."
The deadlock was finally broken just before half-time in the extra 30 minutes, when a Chris Seargeant free-kick was nodded down by Phil Baker into the path of sub Williams, who jabbed it in from close range.
Richie Partridge then hit a post before Darlington settled it with a useful solo effort.
"It took a while to get the first goal but once we got it, the second soon came along," Davies added.
"This is a competition we want to win and hopefully we'll be able to put the trophy in the cabinet at the end of the season."
Saints, the current Welsh Premier League champions, last won the Welsh Cup in 2005.
Bookmark with:
What are these?