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 proto-city of Jericho in the West Bank in Palestine 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 BC, 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 BC) 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, but neither ancient Sparta nor ancient Rome had 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 which the Romans called 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 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). Sections of the Great Wall 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). The large walls of Pingyao serve as one example. Likewise, the 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. Among 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, which 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 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. Examples include the walled cities of Nicosia and Famagusta in Cyprus and the fortifications of Candia and Chania in Crete, which still stand.
The city walls of Jaisalmer
, also known as Jaisalmer Fort
due to its size and complexity in comparison to other city walls. It is a UNESCO World Heritage Site
and is considered one of the largest and best preserved city walls, along with its Medieval Indian town, where many of the stone-carved buildings have not changed since the 12th century.
The gate of the Gonio castle
Wall of Hittite Capital Hattusa (reconstruction)
9th century BC relief of an Assyrian attack on a walled town
City walls in Ávila, Spain, a UNESCO World Heritage Site
A city gate with its towers, the defensive walls, and the city ditch from the 13th century in Metz, France
Medieval churches visible beyond the Renaissance defensive walls of Famagusta, Cyprus
A section of the city walls around York, UK
Defensive walls around the ancient Egyptian settlement of Buhen
Greek walls in Gela, Sicily
Porte St. Louis, part of Ramparts of Quebec City, the only remaining fortified city walls in North America north of Mexico