 The principal Welsh monarch during Ímar 's reign was Gruffudd ap <unk> ( died 1063 / 1064 ) . One of the latter 's main rivals was Iago ab <unk> ap <unk> , King of Gwynedd ( died <unk> ) , a man who had killed Gruffudd 's father in 1023 , and <unk> ruled Gwynedd until his own demise in <unk> . Gruffudd himself may have been responsible for Iago 's slaying , and certainly succeeded to the kingship of Gwynedd after his death . It was likely in the context of Iago 's fall and this resulting regime change that the latter 's son , Cynan ( fl . 1064 ) , fled overseas and sought refuge in Dublin . 
