Following the Norman invasion of Wales in the late 11th century, the area of Sengenhydd remained in Welsh hands. By the middle of the 12th century the area was under the control of the Welsh chieftain Ifor Bach (Ifor ap Meurig). His grandson Gruffydd ap Rhys was the final Welsh lord of Sengenhydd, falling to the English nobleman Gilbert de Clare, the Red Earl, in 1266. In 1267 Henry III was forced to recognise Llywelyn ap Gruffudd as Prince of Wales, and by September 1268 Llywelyn had secured northern Sengenhydd. Gilbert de Clare had already begun to take steps to consolidate his own territorial gains, beginning the construction of Caerphilly Castle on 11 April 1268. The castle would also act as a buffer against Llewelyn's own territorial ambitions and was attacked by the Prince of Wales' forces before construction was halted in 1270. Construction recommenced in 1271 and was continued under the Red Earl's son, Gilbert de Clare, 8th Earl of Gloucester. With only interior remodelling carried out to the castle by Hugh le Despenser in the 1320s, Caerphilly Castle remains a pure example of 13th century military architecture and is the largest castle in Wales, and the second largest in Britain (after Windsor).