The River Aln flows past the north side of the Castle. There is a deep ravine to the south and east, separating the castle from the town. By the 12th century, Alnwick Castle had assumed the general layout which it retains today. It is distinguished as one of the earliest castles in England to be built without a square keep. The castle consists of two main rings of buildings. The inner ring is set around a small courtyard and contains the principal rooms. This structure is at the centre of a large bailey. As the central block was not large enough to contain all the accommodations required in later centuries, a large range of buildings was constructed along the south wall of the bailey. These two main areas of accommodation are connected by a link building. There are towers at regular intervals along the walls of the outer bailey. About a sixth of the bailey wall has been reduced almost to ground level on the bailey side to open up views into the park. Stable and service yards adjoin the castle outside the bailey; these would not have existed when the castle still had a military function.