Defensive wall 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 . History . From very early history to modern times , walls have been a near necessity for every city . Uruk in ancient Sumer ( Mesopotamia ) is one of the world ' s oldest known walled cities . Before that , the city ( or rather proto - city ) of Jericho in what is now the West Bank had a wall surrounding it as early as the 8th millennium BC . The Assyrians deployed large labour forces to build new palaces , temples and defensive walls . Some settlements in the Indus Valley Civilization were also fortified . By about 3500 B . C . , hundreds of small farming villages dotted the Indus floodplain . Many of these settlements had fortifications and planned streets . The stone and mud brick houses of Kot Diji were clustered behind massive stone flood dykes and defensive walls , for neighboring communities quarreled constantly about the control of prime agricultural land . Mundigak ( c . 2500 B . C . ) in present day south - east Afghanistan has defensive walls and square bastions of sun dried bricks . Babylon was one of the most famous cities of the ancient world , especially as a result of the building program of Nebuchadnezzar , who expanded the walls and built the Ishtar Gate . Exceptions were few — notably , ancient Sparta and ancient Rome did not have walls for a long time , choosing to rely on their militaries for defense instead . Initially , these fortifications were simple constructions of wood and earth , which were later replaced by mixed constructions of stones piled on top of each other without mortar . In Central Europe , the Celts built large fortified settlements known as oppida , whose walls seem partially influenced by those built in the Mediterranean . The fortifications were continuously expanded and improved . In ancient Greece , large stone walls had been built in Mycenaean Greece , such as the ancient site of Mycenae ( famous for the huge stone blocks of its ' cyclopean ' walls ) . In classical era Greece , the city of Athens built a long set of parallel stone walls called the Long Walls that reached their guarded seaport at Piraeus . Large tempered earth ( i . e . rammed earth ) walls were built in ancient China since the Shang Dynasty ( c . 1600 - 1050 BC ) , as the capital at ancient Ao had enormous walls built in this fashion ( see siege for more info ) . Although stone walls were built in China during the Warring States ( 481 - 221 BC ) , mass conversion to stone architecture did not begin in earnest until the Tang Dynasty ( 618 - 907 AD ) . In terms of China ' s longest and most impressive fortification , the Great Wall sections had been built prior to the Qin Dynasty ( 221 - 207 BC ) and subsequently connected and fortified during the Qin dynasty , although its present form was mostly an engineering feat and remodeling of the Ming Dynasty ( 1368 - 1644 AD ) during the 15th and 16th centuries . The large walls of Pingyao serve as one example . Likewise , the famous walls of the Forbidden City in Beijing were established in the early 15th century by the Yongle Emperor . The Romans fortified their cities with massive , mortar - bound stone walls . The most famous of these are the largely extant Aurelian Walls of Rome and the Theodosian Walls of Constantinople , together with partial remains elsewhere . These are mostly city gates , like the Porta Nigra in Trier or Newport Arch in Lincoln . Apart from these , the early Middle Ages also saw the creation of some towns built around castles . These cities were only rarely protected by simple stone walls and more usually by a combination of both walls and ditches . From the 12th century AD hundreds of settlements of all sizes were founded all across Europe , who very often obtained the right of fortification soon afterwards . The founding of urban centers was an important means of territorial expansion and many cities , especially in central and eastern Europe , were founded precisely for this purpose during the period of Eastern settlement . These cities are easy to recognise due to their regular layout and large market spaces . The fortifications of these settlements were continuously improved to reflect the current level of military development . During the Renaissance era , the Venetians raised great walls around cities threatened by the Ottoman empire . Among the finest examples are the walled cities of Nicosia and Famagusta in Cyprus and the fortifications of Candia and Chania in Crete , which still stand to this day . Composition . At its most simple , a defensive wall consists of a wall enclosure and its gates . For the most part , the top of the walls were accessible , with the outside of the walls having tall parapet s with embrasure s or merlon s . North of the Alps , this passageway at the top of the walls occasionally had a roof . In addition to this , many different enhancements were made over the course of the centuries : The defensive towers of west and south European fortifications in the Middle Ages were often very regularly and uniformly constructed ( cf . Ávila , Provins ) , whereas Central European city walls tend to show a variety of different styles . In these cases the gate and wall towers often reach up to considerable heights , and gates equipped with two towers on either side are much rarer . Apart from having a purely military and defensive purpose , towers also played a representative and artistic role in the conception of a fortified complex . The architecture of the city thus competed with that of the castle of the noblemen and city walls were often a manifestation of the pride of a particular city . Urban areas outside the city walls , so - called Vorstädte , were often enclosed by their own set of walls and integrated into the defense of the city . These areas were often inhabited by the poorer population and held the " noxious trades " . In many cities , a new wall was built once the city had grown outside of the old wall . This can often still be seen in the layout of the city , for example in Nördlingen , and sometimes even a few of the old gate towers are preserved , such as the " white tower " in Nuremberg . Additional constructions prevented the circumvention of the city , through which many important trade routes passed , thus ensuring that tolls were paid when the caravans passed through the city gates , and that the local market was visited by the trade caravans . Furthermore , additional signaling and observation towers were frequently built outside the city , and were sometimes fortified in a castle - like fashion . The border of the area of influence of the city was often partially or fully defended by elaborate ditches , walls and / or hedges . The crossing points were usually guarded by gates or gate houses . These defenses were regularly checked by riders , who often also served as the gate keepers . Long stretches of these defenses can still be seen to this day , and even some gates are still intact . To further protect their territory , rich cities also established castles in their area of influence . A famous example of this practice is the Romanian " Dracula Castle " at Bran / Törzburg , which was intended to protect Kronstadt ( today ' s Braşov ) . The city walls were often connected to the fortifications of hill castles via additional walls . Thus the defenses were made up of city and castle fortifications taken together . Several examples of this are preserved , for example in Germany Hirschhorn on the Neckar , Königsberg and Pappenheim , Franken , Burghausen in Oberbayern and many more . A few castles were more directly incorporated into the defensive strategy of the city ( e . g . Nuremberg , Zons , Carcassonne ) , or the cities were directly outside the castle as a sort of " pre - castle " ( Coucy - le - Chateau , Conwy and others ) . Larger cities often had multiple stewards — for example Augsburg was divided into a Reichstadt and a bishopal ( clerical ) city . These different parts were often separated by their own fortifications . With the development of firearms came the necessity to expand the existing installation , which occurred in multiples stages . Firstly , additional , half - circular towers were added in the interstices between the walls and pre - walls ( s . a . ) in which a handful of cannon s could be placed . Soon after , reinforcing structures — or " bastion s " — were added in strategically relevant positions , e . g . at the gates or corners . A well - preserved example of this is the " Spitalbastei " in Rothenburg or the bastions built as part of the 17th - century walls surrounding Derry , a city in Ulster in the north of Ireland ; however , at this stage the cities were still only protected by relatively thin walls which could offer little resistance to the cannons of the time . Therefore new , star fort s with numerous cannons and thick earth walls reinforced by stone were built . These could resist cannon fire for prolonged periods of time . However , these massive fortifications severely limited the growth of the cities , as it was much more difficult to move them as compared to the simple walls previously employed — to make matters worse , it was forbidden to build " outside the city gates " for strategic reasons and the cities became more and more densely populated as a result . Decline . In the wake of city growth and the ensuing change of defensive strategy , focusing more on the defense of fort s around cities , most city walls were demolished . Also , the invention of gunpowder rendered walls less effective , as siege cannons could then be used to blast through walls , allowing armies to simply march through . Nowadays , the presence of former city fortifications can often only be deduced from the presence of ditches or parks . Furthermore , some street names hint at the presence of fortifications in times past , for example when words such as " wall " or " glacis " occur . In the 19th century , less emphasis was placed on preserving the fortifications for the sake of their architectural or historical value — on the one hand , complete fortifications were restored ( Carcassonne ) , on the other hand many structures were demolished in an effort to modernize the cities . A notable exception in this is the " monument preservation " law by the Bavarian King Ludwig I of Bavaria , which led to the nearly complete preservation of many impressive monuments such as the Rothenburg ob der Tauber , Nördlingen and Dinkelsbühl . The countless small fortified towns in the Franconia region were also preserved as a consequence of this edict . Modern era . Walls and fortified wall structures were still built in the modern era . They did not , however , have the original purpose of being a structure able to resist a prolonged siege or bombardment . Berlin ' s city wall from the 1730s to the 1860s was partially made of wood . Its primary purpose was to enable the city to impose tolls on goods and , secondarily , also served to prevent the desertion of soldiers from the garrison in Berlin . The Berlin Wall did not exclusively serve the purpose of protection of an enclosed settlement . One of its purposes was to prevent the crossing of the Berlin border between the GDR and the West German exclave of west - Berlin . The Nicosia Wall along the Green Line divides North and South Cyprus . Defensive walls have been built in Korea along the De - militarised Zone . In the 20th century and after , many enclaves Jewish settlements in Israel were and are surrounded by fortified walls , as are many parts of Belfast , Northern Ireland by the " peace lines " . Additionally , in some countries , different embassies may be grouped together in a single " embassy district , " enclosed by a fortified complex with walls and towers — this usually occurs in regions where the embassies run a high risk of being target of attacks . An early example of such a compound was the Legation Quarter in Beijing in the late 19th and early 20th centuries . Most of these " modern " city walls are made of steel and concrete . Vertical concrete plates are put together so as to allow the least space in between them , and are rooted firmly in the ground . The top of the wall is often protruding and beset with barbed wire in order to make climbing them more difficult . These walls are usually built in straight lines and covered by watchtowers at the corners . Double walls , i . e . two walls with an interstitial " zone of fire " ( cf . the Berlin wall ) are rare .