Dublin castle was initially built on the commands of King John of England in 1204 on a location previously settled by the Vikings. He ordered that a castle be constructed with strong walls and good channels for the defense of the conurbation, the government of justice, and the fortification of the King’s treasure. The castle was of archetypal Norman courtyard design, with a central square, encircled on all sides by tall self-protective walls and secluded at each corner by a spherical tower. The castle fashioned one corner of the outer city wall, using the Poddle River as a means of defense alongside two of its sides. During its lifetime, Dublin Castle has been used as an armed forces fortress, a jail, treasury, courts of law and the seat of English Administration in Ireland.