In 1039, Gruffudd ap Llywelyn, apparently in a coup during which the incumbent king was killed, became ruler of Gwynedd. From the outset, it is clear that Gruffudd had no intention of restricting his authority to Gwynedd. Still in 1039, he defeated the English at Rhyd-y-Gors, on the River Severn.
In the same year, Gruffudd struck southwards - "depopulating" Llanbadarn, in Ceredigion, and driving King Hywel ab Edwin, of Deheubarth, into a temporary exile. Two years later (1041) Hywel and Gruffudd met in battle at Pencadair. Gruffudd was victorious. He captured Hywel's wife and took her for himself. Hywel appears, however, to have retained control of Deheubarth, since, in 1042, at Pwlldyfach, he defeated a Viking band who were ravaging Dyfed. In the same year, Gruffudd was captured, temporarily as it turns out, by the Dublin Vikings. In view of subsequent events, it is possible that Hywel had a hand in Gruffudd's capture.
It would appear that Gruffudd had, once again, managed to expel Hywel from Deheubarth. In 1044:
It seems likely that Gruffudd ap Llywelyn had been in cahoots with Rhys and Gruffudd (sons of Rhydderch ap Iestyn - see: Dynastic Disputes), rulers of Morgannwg, in the fight against Hywel, but, now that Hywel was dead, the allies fell-out - the annals refer, unspecifically, to treachery - and the sons of Rhydderch seized control of Deheubarth. Gruffudd ap Llywelyn appears to have reacted by forming an alliance against them with Earl Swein, eldest son of Earl Godwine of Wessex, since, in 1046, Manuscript C of the 'Anglo-Saxon Chronicle' notes that:
Swein's subsequent disgraceful behaviour, however, ensured that the alliance was short lived.
In 1047, about 140 of Gruffudd ap Llywelyn's "family" (i.e. war-band) were killed in Ystrad Tywi (eastern Deheubarth). Presumably Rhydderch's sons were responsible. At any rate, Gruffudd responded by ravaging Dyfed and Ystrad Tywi. At this point, Gruffudd ap Llywelyn disappears from the record for a few years. In 1049, however, Gruffudd ap Rhydderch allied himself with a marauding Hiberno-Norse fleet. Florence of Worcester reports that:
The King Griffin ravaging Herefordshire on that occasion was probably Gruffudd ap Llywelyn. The following year (1053), however:
Manuscript C of the 'Anglo-Saxon Chronicle' notes, in its entry for 1053, that:
Westbury might be Westbury on Severn (Gloucestershire) or Westbury (Shropshire). If it was the former, then it might be supposed that the villain of the piece was Gruffudd ap Rhydderch, whereas, if it was the latter, Gruffudd ap Llywelyn would be the obvious candidate.
The, inevitable, showdown between the two Gruffudds occurred in 1055. Gruffudd ap Rhydderch was killed, leaving Gruffudd ap Llywelyn, effectively, in control of the whole of Wales - a feat achieved by no other Welsh king. He appears, however, to have been a ruthless ruler. The Norman-Welsh author, Giraldus Cambrensis (Gerald of Wales, c.1146-c.1223) wrote the 'Itinerarium Cambriae' (Itinerary of Archbishop Baldwin through Wales) soon after 1188. He notes that Gruffudd "by his tyranny, for a long time had oppressed Wales". Story-teller, Walter Map, who hailed from the Welsh marches (probably born in or near Hereford) and was a friend of Gerald of Wales, writes that Gruffudd:
In King Edward's England, meanwhile, Earl Godwine had died. His earldom passed to his son Harold, and Harold would be Gruffudd's nemesis.