A defensive wall (or a "Rampart") is a fortification used to protect a city or settlement from potential aggressors. In ancient to modern times, they were used to enclose settlements. Generally, these are referred to as city walls or town walls, although there were also walls, such as the Great Wall of China, Hadrian's Wall, and the metaphorical Atlantic Wall, which extended far beyond the borders of a city and were used to enclose regions or mark territorial boundaries. Beyond their defensive utility, many walls also had important symbolic functions — representing the status and independence of the communities they embraced.Existing ancient walls are almost always masonry structures, although brick and timber-built variants are also known. Depending on the topography of the area surrounding the city or the settlement the wall is intended to protect, elements of the terrain (e.g. rivers or coastlines) may be incorporated in order to make the wall more effective.Walls may only be crossed by entering the appropriate city gate and are often supplemented with towers. In the Middle Ages, the right of a settlement to build a defensive wall was a privilege, and was usually granted by the so-called "right of crenellation" on a medieval fortification. The practice of building these massive walls, though having its origins in prehistory, was refined during the rise of city-states, and energetic wall-building continued into the medieval period and beyond in certain parts of Europe.