Ruarc mac Brain (died 862) was the fourth of ten Kings of Leinster to be inaugurated and based on Lyons Hill, Ardclough, County Kildare, a member of the Uí Dúnchada, one of three septs of the Uí Dúnlainge dynasty which rotated the kingship of Leinster between 750 and 1050, significant in County Kildare History.
The Annals of the Four Masters add that he was killed by the Uí Néill, the leadership of which passed in theory from Máel Sechnaill to Áed Findliath that same year at Máel Sechnaill's death, and perhaps in practice rather earlier.
Other entries in the Irish annals conflict with the regular succession shown in the king lists.
In 848, when reporting one of the several defeats of Vikings that year, at Sciath Nechtain, near modern Castledermot, County Kildare, the Annals of Ulster say that the Leinstermen were led by Lorcán.
Byrne suggests that the root of this apparent confusion lay in the fact that the Uí Dúnlainge kings exercised little real authority due to the aggressions of their western neighbour Cerball mac Dúnlainge, King of Osraige.