From 1204 until 1922 it was the seat of English, and later British rule in Ireland. During that time, it served principally as a residence for the British monarch's Irish representative, the Viceroy of Ireland, and as a ceremonial and administrative centre.