The story lines are different. The Iraqi government has taken steps to minimize civilian casualties in its assault on the Islamic State. The same is not true of forces loyal to Syrian President Bashar al-Assad, whose government presided over the merciless hollowing out of his nation’s cities in a bloody civil war that is now entering its sixth year.

AD

AD

But there is much that also binds the fates of Mosul and Aleppo. As the smoke of battle clears, we’re seeing images of the devastation of two of the Middle East’s most historic cities. The ancient pre-Islamic remains of Nimrud, on the banks of the Tigris near Mosul, were systematically dismantled and vandalized by the Islamist militants. Biblical sites within Mosul were detonated. Aleppo’s Old City, once one of the Middle East’s preeminent tourist sites, famed for its souks and the medieval citadel, is a ghost town of rubble and ruin.

The scale of the destruction is chilling, considering how much history has come before it. These cities withstood centuries of warfare, invasion, sieges and surrenders.

“How many battles has it provoked, and how many white blades have been drawn against it?” the 12th-century Andalusian traveler Ibn Jubayr wrote of Aleppo. But even then, in a walled city on the front lines of the Crusades, he saw in Aleppo a remarkable quality of resilience: “The town is old as eternity yet new although it has never ceased to be. … Oh city of wonder! It stays, but its kings depart; they perish, but its ruin is not yet decreed.”

Mosul and Aleppo can trace their origins thousands of years back in a region long known as the cradle of civilizations. Unlike other cities that emerged as religious centers, such as Jerusalem, or bastions of political power, such as Damascus and Baghdad, Mosul and Aleppo were first and foremost great emporiums of trade.

AD

AD

That did not mean they were immune to conflict. The cities were for a time united under the rule of a Turkic dynasty that led the Muslim fight against the First Crusade. They would later endure the merciless pillaging and wars of Mongol marauders. A 13th-century rebellion in Mosul against Mongol occupiers provoked a chilling response from the infamous warlord Hulagu Khan: After he had subdued the revolt, he trussed its leader up in a sheepskin and left the man to literally rot to death in the sun, vermin eating him alive.

In 1400, the Mongol conqueror Timur, also known as Tamerlane, sacked Aleppo. One chronicler described the brutality of the raid “like a razor over hair” and “locusts over a green crop.” Others detailed mass slaughter of the civilian population and the wanton rape of women who had been hiding in the city’s mosques. The streets “stank with corpses.” Timur, according to accounts, stacked a pile of thousands of skulls outside Aleppo’s gates.

Still, the cities, including some of their great historic sites, survived and flourished. They reached their peak as key endpoints of the Silk Road under the Ottoman Empire. In the West, Mosul was so synonymous with the goods of the East that the fine silk made by weavers in what is now Bangladesh became known as muslin, a name derived from Mosul. Aleppo was so famous that when one of the witches in Shakespeare’s “Macbeth” spoke of a sailor’s wife — “Her husband’s to Aleppo gone, master o’ th’ Tiger” — the audience would have known of this exotic city’s wealth and delights. In “Othello,” Aleppo is invoked as a raucous meeting point of the world’s cultures and peoples.

AD

AD

Both cities had majority Sunni populations but also considerable Christian and Jewish communities, as well as a dizzying ethnic mix of Arabs, Turkmen, Kurds, Armenians and others. The diversity was a defining part of their character. Coexistence — not sectarian strife — was the norm for most of their histories.

“It was really the Ottoman city, the last mixed city, where relations were very good,” said Philip Mansel, a historian and author of “Aleppo: The Rise and Fall of Syria’s Great Merchant City.” He said sectarian violence was uncommon in Aleppo in the age of Ottoman rule: “Over the course of my research, I have only found one inter-communal conflict in 1850 and one in 1919, but that was a smaller riot.”

When the European powers carved up the Ottoman Empire at the end of World War I, France sought possession of both Mosul and Aleppo — two cities with linked histories and cultures — as part of its protectorate. But oil concerns and regional power politics would eventually see Britain wrest control of Mosul and stitch it together with the old Ottoman provinces of Basra and Baghdad to create the nation now known as Iraq. Aleppo would be yoked to Damascus by the French and remained the other metropolis of Syria, a commercial capital always somewhat removed from the political center.

AD

AD

The disintegration of these societies in Iraq and Syria is the consequence of modern politics. Destabilizing wars and hopeless governance created security vacuums and extremist insurgencies that now haunt the region. Narrow-minded rule from Damascus and Baghdad laid the foundations for the current unraveling, which has seen the bulk of both cities’ populations displaced by conflict. When the fighting ends in Mosul and Aleppo, rebuilding what has been lost may be the greater struggle.

Louisa Loveluck in Beirut contributed to this report.