Rhun ap Maelgwn Gwynedd (died c. 586), also known as Rhun Hir ap Maelgwn Gwynedd (), sometimes spelt as 'Rhûn', was King of Gwynedd (reigned c. 547 – c. 586). He came to the throne on the death of his father, King Maelgwn Gwynedd. There are no historical records of his reign in this early age. A story preserved in both the Venedotian Code and an elegy by Taliesin says that he waged a war against Rhydderch Hael of Alt Clut and the kings of Gododdin or Manaw Gododdin. The small scattered settlement of Caerhun in the Conwy valley is said to be named for him, though without strong authority. Rhun also appears in several medieval literary stories, as well as in the Welsh Triads. His wife was Perwyr ferch Rhûn "Ryfeddfawr" and their son was Beli ap Rhun "Hîr". Rhun ap Maelgwn appears in the royal genealogies of the Harleian genealogies, Jesus College MS. 20, and Hengwrt MS. 202. The Bonedd y Saint () says that he is the ancestor of Saint Edeyrn (the Bonedd y Saint says that Edeyrn was the great-grandson of Rhun, while Hengwrt MS. 202 says that he was the grandson of Rhun). War with the North The Venedotian Code of the Welsh laws compiled by Iorwerth ap Madog in the early 13th century contains a list of the privileges of the men of Arfon. Among the privileges is the right to march in the van of Gwynedd's army, and this is stated to originate from their spirited actions in a war between Rhun of Gwynedd and the Cymric Men of the North () from the kingdoms of Alt Clut and Gododdin or Manaw Gododdin. Taliesin's Marwnad Rhun () also tells of the war and Rhun's death in it. In his comprehensive discussion of the works by and attributed to Taliesin, John Morris-Jones notes that the particulars of the marwnad are everywhere consistent with the historical record and nowhere inconsistent, and likely a product of the 6th century, a view shared by notable skeptics such as Thomas Stephens. The Venedotian Code says that the northern prince Elidyr Mwynfawr ap Gorwst Priodawr () had been slain at Aber Mewydus (now called 'Cadnant', or 'Battle Brook') in Arfon, not far from Rhun's llys () at Llanbeblig. Elidyr's powerful relatives in the North invaded Gwynedd in retaliation, burning Arfon in the process. The Northern host was led by