york castle is a fortified complex in the city of york, england. it has comprised a sequence of castles, prisons, law courts and other buildings, which were built over the last nine centuries on the south side of the river foss. the now-ruined keep of the medieval norman castle is commonly referred to as clifford's tower. built originally on the orders of william i to dominate the former viking city of jórvík, the castle suffered a tumultuous early history before developing into a major fortification with extensive water defences. after a major explosion in 1684 rendered the remaining military defences uninhabitable, york castle continued to be used as a jail and prison until 1929.