ALEPPO, Syria (Reuters) - Before the war, Aleppo’s ancient walled citadel drew in armies of visitors to one of the Middle East’s greatest treasures.

A general view shows the Old City of Aleppo, Syria November 24, 2008. REUTERS/Omar Sanadiki

But for the past four years the Citadel’s high stone ramparts have been on the front line of fighting pitting the Syrian army and its allies against rebels who occupied much of the Old City surrounding the fortress.

Sudden advances by the army led to a ceasefire last week and evacuation of insurgents and many civilians, ending the warfare in Aleppo and putting the city entirely into government hands.

Reuters photographs from before and after the fighting reveal how the city has been scarred by years of air strikes, shelling, street fighting, fires and neglect. For a slideshow see: reut.rs/2ibm9sD

The fate of Aleppo, listed by the United Nations as a World Heritage Site, has been the subject of great anxiety for city residents, archaeologists, historians and travelers, even as they despair for the human suffering caused by the fighting.

“We are now exactly in front of the Citadel’s entrance. These streets are very familiar. My school was nearby. Now, only part of it is left,” said Abdel Rahman Berry, a lawyer. “It was ruined. They ravaged our childhood memories,” he added.

Large sections of Aleppo’s Islamic-era covered market or souk, one of the most extensive in the world, were destroyed in clashes in 2012 and 2013, and the 11th century minaret of the Umayyad mosque was brought down by shelling.

During a visit to the Old City and inside the Umayyad mosque with the Syrian army, reporters were shown rubble-strewn streets and scorched walls that were once part of the souk, pocked with bullet holes and daubed with slogans.

The Umayyad mosque was also scarred by the fighting, and the remains of its ancient stone minaret lay in a heap in one corner where it had collapsed after suffering a direct hit, but despite damage, its elegant floor and arcaded walls remained.

Slideshow ( 22 images )

“THE EYE AND ITS PUPIL”

While the city, one of the oldest continuously habited in the world, was split into warring government and rebel sectors, the army retained control of the citadel even when it was surrounded by insurgents on three sides and could only be accessed by a tunnel.

“There were around 25 of us protecting the citadel. We used to switch with armed men who were stationed in the old market through a tunnel that was dug underneath,” said a Syrian soldier from the Citadel’s garrison.

Despite that exposed position, and repeated attempts by rebels to capture it, the damage to the Citadel, with its towering gatehouse and sloping arched bridge, was not as bad as elsewhere in the Old City. Government snipers fired at rebels through arrow slits in walls.

“There is some damage but it can be managed. The situation is good inside the Citadel but the disaster and the real damage was inflicted on the old market,” said Mamoun Abdelkarim, Syria’s Director General of Antiquities.

During its stormy history, Aleppo has been controlled by Hittites, Assyrians, Arabs, Mongols, Mamluks and Ottomans and it bears the marks of many of those conquerors in its diverse architectural styles.

The great Ayyubid leader Salah al-Din, who battled European Crusaders in the 12th century, described Aleppo as being “the eye of Syria, and the citadel is its pupil”.

No stranger to war and disaster, the Citadel was damaged by the Mongol invasion of 1260 and again destroyed by invading forces in 1400. It was used as a barracks for Ottoman troops and more recently for soldiers during the French mandate. It sustained heavy damage in the earthquake of 1822.

Among important features lost in recent fighting were medieval mosques and trading houses. Others, including the al-Shibani church school, evidence of Aleppo’s history of religious tolerance, and the 13th century Nahasin bathhouse were damaged.

Aleppo’s Old City and citadel had been restored in 2004.

One of the tactics used by rebels in the intense street fighting through the Old City’s narrow alleyways was the detonation of mines, dug beneath army positions in tunnels. The soldier said even on top of the citadel one such blast, under the Carlton Hotel, a landmark, had felt like an earthquake.

“The bodies of our comrades are still under the hotel rubble,” he added.