Ten-man Barry Town United were beaten 3-2 at Caernarfon in the Cymru Premier.
Josh Yorwerth was sent off for the third time so far this season as Steve Jenkins' men put in a battling performance against their top six rivals at The Oval on Saturday.
Both sides grinded out early chances with Elliot Richards shooting over the bar while keeper Luc Rees did well to block the 'Cofi Messi', Darren Thomas, from Zack Clarke's cross.
But Barry, who won five of their six previous league outings, went ahead after 24 minutes when Mikey George broke clear down the right flank before his right footed volley evaded home keeper Hari Thomas.
George nearly doubled the lead after lobbing the Cofi keeper, only to slot his follow-up shot wide of the net.
But an ill-judged moment of indiscipline brought Caernarfon back into the game on 34 minutes after Yorwerth was shown a straight red for pushing Adam Davies in the box. Louis Lloyd went onto make no mistake with the resulting penalty.
The ex-Wrexham forward would be called up to the spot again before half time, after he was brought down in the area by Callum Sainty.
Lloyd again dispatched the spot kick past Rees with ease to put Caernarfon ahead.
But Barry enjoyed the better start to the second half when Zac Clarke blasted the ball directly at the visiting keeper from Thomas' cross, producing a super save as a result.
Then six minutes after the break, Caernarfon failed to deal with a Robbie Willmott setpiece which was volleyed home by Ben Margetson.
A battling draw would have been deemed a fair result, but the Cofis had the last word on 82 minutes, when sub Osian Ellis teed up Matty Jones, who struck straight past Rees to grab all three points.
Barry remain in the top half of the table, three points clear of their nearest rivals - and their next opponents - Bala, who play host at Maes Tegid next Saturday.
The Lakesiders will be keen to bounce back from their shock exit in the Welsh Cup over the weekend, losing 1-0 to Cymru South club Caerau Ely.
JD Cymru Premier results
Cardiff Met 2-0 Flint Town United
Caernarfon Town 3-2 Barry Town United

Penarth cup clash moved to Arms Park
Barry Town unveils new club strategy
Two out of two for Ingle
Rugby community rallies after Penarth fire
Barry hit four past Haverfordwest
Cowbridge edge Barry in youth derby
Barry Ladies see red in Ferry defeat
Penarth withdraw from Mallett Cup
Llantwit return with Lido win
Ingle scores in Wales-South Korea draw
Barry face Gresford in Welsh Cup
Lloyd misses cut for Springboks finale
Lloyd called up to Wales squad
Barry cruise past Llanelli in Welsh Cup
Barry and Llanelli Warriors entertain in friendly
Barry Ladies bounce back against Aber