Nineveh was an Assyrian capital city on the Tigris, in ancient Mesopotamia, possibly as large as 290 square miles, according to Handbook To Life In Ancient Mesopotamia, by Stephen Bertman. The magnificent city of Babylon was probably about 50 square miles larger. Protective structures like the medieval castles surrounded urban areas of the time. Walls defined cities. They served for protection, possibly against flood, but also against military aggression. Inside were minimally temples and the king's residence. Walls were mostly composed of the ample mudbrick of the area. Asphalt was also available for mortar and reeds for filler. Some cities had moats serving as an additional line of defense; others, used rivers. To accommodate four-horse chariots, access to the cities required ample, arched gateways, like Babylon's famous Ishtar gate. There were also towers.
Herodotus describes such a Mesopotamian city in the first book of his history.
Herodotus, G.C. Macaulay translation
Now Assyria has doubtless many other great cities, but the most famous and the strongest, and the place where the seat of their monarchy had been established after Nineveh was destroyed, was Babylon; which was a city such as I shall say. -- It lies in a great plain, and in size it is such that each face measures one hundred and twenty furlongs, the shape of the whole being square; thus the furlongs of the circuit of the city amount in all to four hundred and eighty. Such is the size of the city of Babylon, and it had a magnificence greater than all other cities of which we have knowledge. First there runs round it a trench deep and broad and full of water; then a wall fifty royal cubits in thickness and two hundred cubits in height: now the royal cubit is larger by three fingers than the common cubit. 179. I must also tell in addition to this for what purpose the earth was used, which was taken out of the trench, and in what manner the wall was made. As they dug the trench they made the earth which was carried out of the excavation into bricks, and having moulded enough bricks they baked them in kilns; and then afterwards, using hot asphalt for mortar and inserting reed mats at every thirty courses of brickwork, they built up first the edges of the trench and then the wall itself in the same manner: and at the top of the wall along the edges they built chambers of one story facing one another; and between the rows of chambers they left space to drive a four-horse chariot. In the circuit of the wall there are set a hundred gates made of bronze throughout, and the gate- posts and lintels likewise.
.... 180. Babylon then was walled in this manner; and there are two divisions of the city; for a river whose name is Euphrates parts it in the middle. This flows from the land of the Armenians and is large and deep and swift, and it flows out into the Erythraian sea. The wall then on each side has its bends carried down to the river, and from this point the return walls stretch along each bank of the stream in the form of a rampart of baked bricks: and the city itself is full of houses of three and four stories, and the roads by which it is cut up run in straight lines, including the cross roads which lead to the river; and opposite to each road there were set gates in the rampart which ran along the river, in many in number as the ways, and these also were of bronze and led like the ways to the river itself. 181. This wall then which I have mentioned is as it were a cuirass for the town, and another wall runs round within it, not much weaker for defence than the first but enclosing a smaller space. And in each division of the city was a building in the midst, in the one the king's palace of great extent and strongly fortified round, and in the other the temple of Zeus Belos with bronze gates, and this exists still up to my time and measures two furlongs each way, being of a square shape: and in the midst of the temple is built a solid tower measuring a furlong both in length and in breadth, and on this tower another tower has been erected, and another again upon this, and so on up to the number of eight towers.