Rhain was an 11th-centuryking ofDyfed.
It is unclear when Rhain's reign began. He claimed to be the son ofMaredudd ab Owain,King of Gwynedd, a younger son ofOwain ap Hywel Dda,King of Deheubarth and the grandson of KingHywel Dda. Rhain was apparently accepted as such by the people of theKingdom of Dyfed, and by the anonymous author of the C text of theAnnals of Wales.[1] It has been suggested that Rhain might have been an illegitimate son and fled to Ireland for safety when Maredudd died and Gwynedd was claimed byCynan ap Hywel thenAeddan ap Blegywryd, possibly by violence.[2] Hywel Dda had a son whose name was spelled Rhain or Rhun,[3] and given the naming conventions of the medieval Wales, it is possible that his name, historically identified with earlier rulers of Dyfed through Hywel's wife Elen ferch Llywarch ap Hyfaidd, king of Dyfed, was an indication of a familial relationship with the line of Hywel Dda.[4]
Llywelyn ap Seisyll, King ofGwynedd, was the son in law ofMaredudd ab Owain through his marriage to Angharad ferch Maredudd ab Owain, and saw Rhain's successful takeover of the Kingdom of Dyfed as a threat to his control of his more northern territories. Llywelyn brought an army against Rhain.[5][6]
Rhain was later recorded as acting 'after the manner of the Irish' and 'proudly and ostentatiously' encouraging his men to fight in the battle, promising them victory. However, Rhain's troops lost the battle against the army from Gwynedd, and he was recorded by the victors as fleeing 'shamefully, like a fox'.[7]
After his defeat at the Battle of Abergwilli near Carmarthen, he was deposed byLlywelyn ap Seisyll in 1022.[8] Rhain was recorded by the other histories of the time as Rhain the Irishman (Old Welsh:Rein Yscot; WelshLatin:Reyn Scottus) and treated as apretender.[7] The B text of the Welsh annals asserted he was killed in the battle with Llywelyn; theChronicle of the Princes, however, pointedly notes that his body was not discovered.[9]