Dublin Castle is at present a major Irish Government complex. The Castle was first founded in 1204 as a major defensive work on the orders of King John of England. It was the fortified seat of British rule in Ireland until 1922. Most of it dates back to 18th century and this historic castle has fulfilled many roles through its history. It is said that it was originally built as a defensive fortification for the Norman city of Dublin and later was evolved into a royal residence, which was resided in by the Lord Lieutenant of Ireland. The second in command in the castle administration, the Chief Secretary of Ireland, had his offices there.