Carrickfergus Castle in County Antrim is one of the best-preserved medieval structures in the whole of Ireland. It was built by the Norman conqueror John de Courcy in 1177. Over the centuries the castle has been attacked and captured numerous times and used for many purposes. Edward the Bruce of Scotland, brother of Robert, invaded Ulster in 1315 but failed to take Carrickfergus Castle. In the late 1790s, the castle was employed as a prison and many of the United Irishmen were incarcerated here. A century later it was used as an armory and a magazine and during WW1 anti-submarine guns were mounted here to protect Belfast Lough. In August 1961 Queen Elizabeth II and Prince Philip landed at Carrickfergus from the Royal Yacht Britannia to begin a short visit to Northern Ireland, maintaining the regal connections to this location. The castle has survived over 750 years of continuous military occupation and in 1928 ownership was transferred to the state for preservation as an ancient monument.