The Vikings built fortifications on the River Liffey in 930, establishing Dublin. They controlled trade in Ireland until being defeated by King Brian Boru in 1014. The Normans later invaded and took control of Dublin Castle in 1169. Over the following centuries, Dublin Castle served as the center of English rule in Ireland, housing government offices, prisons, and military facilities. It remained a symbol of British control until being handed over to the new Irish government in 1922. Today it is a tourist and cultural site.