 Following Llywelyn 's death in 1240 , Gwynedd 's power declined and many of its eastern lands were taken by Henry III of England in 1247 . Llywelyn 's grandson , Llywelyn ap Gruffudd , took power in 1255 and imprisoned his brother Owain ap Gruffudd before extending his power across Wales . Owain was eventually released in 1277 and there has been much historical debate over which castle he was held in . Hywel Foel ap <unk> wrote a famous poem describing Owain 's long imprisonment in a round tower ; historians believe that this refers to the keep at <unk> . 
