Newport moved four points clear of the Sky Bet League Two relegation zone and inflicted a heavy blow on bottom club Harrogate with a 2-1 win at Rodney Parade.
Nathan Opoku gave the hosts an eighth-minute lead with a composed finish into the top corner after being played through by Ben Lloyd.
Harrogate were level six minutes before the break when Jacob Slater’s cutback from the left was converted by Jack Evans.
And Ellis Taylor very nearly gave the visitors a half-time lead when he placed a side-foot effort just wide of Jordan Wright’s far post.
But it was the Exiles who sealed a crucial win thanks to a moment of magic from the unlikely source of right wing-back Joe Thomas.
His second goal for the club, and his first for 14 months, was a spectacular strike that arrowed into the top corner from 30 yards.
And Christian Fuchs’ men held on to move clear of the bottom two with three games remaining and leave the visitors deep in trouble.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.