Originally built in the 13th century on a site previously settled by the Vikings it functioned as a military fortress, a prison, treasury, courts of law and the seat of English Administration in Ireland for 700 years. Castle is now used for important State and Presidential Inaugurations. The State Apartments, Undercroft, Chapel Royal, Craft Shop, Heritage Centre and Restaurant are open to visitors. (On occasions Dublin Castle can be closed at very short notice for Government business).