Harlech Castle, located in Harlech, Gwynedd, Wales,
is a medieval fortification, constructed atop a spur
of rock close to the Irish Sea. It was built by Edward
I during his invasion of Wales between 1282 and 1289 at
the substantial cost of £8,190. Over the next few centuries,
the castle played an important part in several wars,
withstanding the siege of Madog ap Llywelyn between 1294–95,
but falling to Owain Glyndŵr in 1404. It then became Glyndŵr's
residence and military headquarters for the remainder of the
uprising until being recaptured by English forces in 1409.
During the 15th century Wars of the Roses, Harlech was held by the Lancastrians for seven years, before Yorkist troops forced its surrender in 1468, a siege memorialised in the song Men of Harlech. Following the outbreak of the English Civil War in 1642, the castle was held by forces loyal to Charles I, holding out until 1647 when it became the last fortification to surrender to the Parliamentary armies. In the 21st century the ruined castle is managed by Cadw, the Welsh Government's historic environment service, as a tourist attraction.