The New Saints left it late as they edged past Afan Lido, thanks to goals from Chris Marriott and Mike Wilde at the Marstons Stadium.
Chris Hartland gave his side the lead at the break but an excellent Marriott free kick coupled with a last minute winner from Wilde, ensured the victory for The Saints.
TNS started brightly with Chris Seargeant hitting a close range free kick over the bar and in what was an even game, neither side created many chances during the opening period.
However, on the half hour mark, Hartland sprinted away from both Phil Baker and Kai Edwards, before converting into the bottom corner. The Lido number seven was direct as well as efficient and made no mistake from just inside the 18 yard box to give Lido the lead.
Minutes later, Wilde powered a volley just over, after Alex Darlington’s strike had been blocked and sixty seconds later, Jamie Mullan’s fantastic cross was unfortunately blocked by the stubborn home defence.
In the last minute of the first half, Chris Jones attempted a sensational volley from a really tight angle and the former Swansea winger was only denied by a flying save from Craig Richards.
The second half started with Lido once again defending really well and Baker was forced into a crucial interception, as the home side once again looked dangerous on the break.
Ten minutes after the restart, Marriott levelled the match. The energetic left back did wonderfully well to find the bottom corner after Jones had won a free kick for the Champions. The TNS number three curled his effort past Richards from 25 yards out.
Within a minute, Darlington was thwarted from inside the six yard box as The Saints stepped up a gear. Despite getting his shot on target, Richards made himself big and stopped the former Wrexham man from getting his name on the score sheet.
Marriott then attempted to turn into a provider and it was his excellent delivery from a corner that Baker met but headed over the bar, as TNS continued to look for the winning goal.
Harrison sent on Matty Williams and Greg Draper in search of the three points and it nearly came through Marriott. The Saints won another free kick and the TNS goal scorer was desperately unlucky to see his magnificent free kick fly over the wall, only for it to hit the post and bounce back out.
The Oswestry based side continued to press and as the match approached stoppage time, Wilde met a powerful corner with a bullet header to ensure a dramatic victory. The former Chester City forward found space and converted to give his side a very important win in South Wales.
The New Saints line up was Paul Harrison (C), Simon Spender, Chris Marriott, Phil Baker, Kai Edwards, Aeron Edwards, Chris Seargeant (Greg Draper 72), Alex Darlington (Matty Williams 72), Jamie Mullan, Chris Jones and Mike Wilde.
The unused substitutes for The Saints are Ryan Kershaw and Aaron Simms.
The Afan Lido line up was Craig Richards, Dean Hudson, Ryan Batley, Mark Crutch (C), Ian Hillier, Chris Hartland (Garyn Preen 70), Alex Gammond (Jamie Jones 90), Kieran Howard (Jordan Smith 72), Scott McCoubrey, Gareth Phillips and Keyon Reffel.
The unused substitutes for Lido were Kristian James and Owen Williams.