ALGIERS From cutlass and canon to earthquake and flood, powerful forces have long done damage to the Algiers Casbah, fabled bastion of Barbary pirates who plied the Mediterranean for centuries in defiance of European power.
But the deadliest of the many blows suffered by Algiers' disintegrating old quarter may actually be contemporary -- neglect by successive governments of modern Algeria.
The few outsiders who visit tend to wonder why this U.N. World Heritage site with an epic past woven deeply into Mediterranean history should be at risk of collapse -- and in a north African state earning $1 billion a week from oil and gas.
The answer is a lack of political will, Algerians say. Oil wealth has meant tourism has been a low priority, despite the powerful attraction this haunting Ottoman settlement could exert on Western tourists in search of the exotic and educational.
The result is that the labyrinth of alleys, palaces and fountains clinging to a steep hill above Algiers port is now a fissure-ridden slum of mostly graying, rotting buildings. Many of the population of more than 30,000 live in squalor.
"This is our culture and our soul and we should protect it," says construction official Fatah Abdelaoui, his voice echoing in the cool interior of Hassan Pasha palace, an elegant structure of marble and mosaics currently under renovation.
"CASBAH IN DANGER"
"The Casbah is in danger, and we must save it before it is too late," historian Belkacem Babaci said, reflecting a pride found everywhere among the tottering huddle of walled houses.
"If we restore the Casbah, it would become our number one touristic product," he said, adding that of the roughly 1,200 houses in the 36-hectare (89-acre) site, 136 were in good condition but 600 needed urgent work.
The Casbah began as a Phoenician trading post in antiquity but in its current form dates to 16th-century Ottoman rule, when it emerged as a power under Aruj and Kheir ad-Din Barbarossa, pirate brothers dreaded by their European shipping prey.
Italian renaissance master Fra Filippo Lippi and Spanish poet and novelist Miguel de Cervantes were among the tens of thousands of Europeans abducted by Algiers corsairs and held for ransom in the Casbah's dungeons or enslaved by wealthy families.
The town was a centre of Algerian resistance against French forces in Algeria's 1954-1962 war of independence, a struggle portrayed in the 1966 film "The Battle of Algiers" by Italian director Gillo Pontecorvo, who shot much of it in the Casbah.
It was also a stronghold of Islamist guerrillas in the early 1990s at the start of a revolt against the army-backed government that has now largely died down. Security is greatly improved in the Casbah, residents, officials and diplomats say.
But the idea of using its story to generate tourism, development and jobs, and shore up political stability and fight poverty, has never ranked highly with Algeria's rulers.
The town, named a UNESCO World Heritage site in 1992, was declared a protected site in Algerian law only in 2003.
The government's defenders say it has had to give priority to security as Algeria emerged from the bloodshed of the 1990s, and to meet an urgent need for modern housing.
Abdelkader Ammour, the Casbah-born President of the Casbah Foundation, a private conservation group, says neglect by the state became so profound at one point that there was talk for a time of removing the Casbah from the UNESCO list.
But he says people in power have shown recent signs of taking restoration more seriously. An example is a 300 million dinars ($4.8 million) plan announced in March to shore up the walls of houses in imminent danger of falling over.
The money is a fraction of the sum that may eventually be needed. But it is meant to be followed by more which Ammour hopes will be distributed to house owners who can use the sums as seed capital to obtain bank loans to fund further works.
Authority for renovation has been handed to the culture ministry, simplifying management. Previously authority was shared by several bodies, slowing decision-making. But much remains unclear, including the extent of future state support.
Ammour said: "We've woken up very late" to the Casbah's plight. A series of similar initiatives in the past 20 years all failed. Obstacles have been many -- disputes over legal title to the buildings, overcrowding and periodic political violence.
Some people deliberately damaged their homes in the mistaken hope of resettlement in state housing elsewhere -- a consequence of a now-abandoned bid to rehouse the population and allow a mass renovation unimpeded by residents.
Also, an expectation persists that the state will pay for all repairs, residents say. Most Casbah homes are owned privately, many of them by absentee landlords.
"The Casbah is our inheritance and we want to keep it. But it's up to the government to help us renovate," said Baretsha Fadloune, 66, who rents out rooms in his dilapidated house.
There are other social problems. Many original inhabitants moved out on independence from France in 1962. Others moved in, and then rented out rooms to families fleeing political turmoil in the countryside or seeking jobs in the city.
Once a close community of city people, the Casbah now has a shifting population where rural traditions have taken hold and many of the crafts and skills of urban building have been lost.
Most state-sponsored renovation to date has been by artisans from outside of the Casbah and is poor, say some residents.
Moulidj Hajd Zubir, 75, has spent years restoring a 400-year-old villa that was once the British Consul's residence.
He said he approves of the latest renovation plan but adds that that "outsiders" ignorant of traditional Casbah building should have no role in renovation.
"Make sure the original inhabitants are involved in the project," he replies when asked what advice he has for the project. "People who are not originally from here cannot understand its value."