The visitors started strongest and were in front after only 4 minutes through Luke Norman.
However Llanfair responded well, equalising via a Dan Morgan penalty in the 14th minute after Callum Whyte was fouled in the area.
Minutes later, Llanfair were in front through Ben Jones, heading home a Max McLaughlin corner.
Caersws were reduced to 10 men after 18 minutes for violent conduct.
Dan Morgan grabbed his second of the game on 26 minutes, a brilliant left footed snap shot into the far corner of the net.
In the second half, Llanfair started very strongly but missed a host of chances. However, Callum Whyte was able to make it 4-1 on 58 minutes, steering in a Max McLaughlin cross from close range.
Caersws made it difficult for Llanfair towards the end of the game. Huw Wainwright headed in from a corner on 63 minutes before a Will Evans free kick piled more pressure on Llanfair.
However Llanfair composed themselves and held on for all 3 points.
Player for the Match - Dan Morgan