The crisis in Algeria, where jidhadist rebels have seized an oil installation and a group of foreign workers, may come as a surprise to many Americans who had not given much thought to the trouble brewing in the Sahara. But the taking of hostages in Algeria and the insurrection in neighboring Mali are part of a larger picture with which Americans have become all too familiar.

The history of conflict between the Muslim and Western world goes back for centuries; the latest conflicts are the newest manifestation of age-old tensions. It is easy to interpret these conflicts as part of a religious war. After all, the Islamist movements that have caused violence across the region espouse a fundamentalist, puritanical streak of Islam that is hostile to other faiths.

But often religion is just an excuse. The trouble in Africa follows a history of colonialism that still reverberates. After all, it was only a generation ago that world maps showed Algeria and Mali, often tinted in French blue, as part of something called French West Africa.

Algeria had to wage a vicious anti-colonial war in the 1950s to win independence from France. In the 1990s civil war in Algeria between the government and a brutal Islamist movement claimed hundreds of thousands of lives, mainly civilians. As during the more recent Arab Spring, people are rising up against corrupt authoritarian regimes, sometimes turning to a fundamentalist form of Islam as a motivating force.

Throughout the Muslim world, modernity and change occurring in urban centers has had to contend with the traditional way of life and values of rural peoples. These tensions have grown worse in the 20th and 21st centuries because modern life brings with it so much in the way of technology and alien culture, including contemporary media, that threatens traditional values.

A recent book by Tamim Ansary, an Afghan-American author, traces the present conflict in Afghanistan to tensions, going back to the 19th century kings of Afghanistan, between the city and the countryside, between the drive to modernize and traditional values, such as the veiling of women and the informal seemingly unstructured village mores by which life was lived for generations. Foreign powers — British, Russian, American — barge in from time to time, but they can never settle the native Afghan conflict. Afghans will have to settle that over time.

In Mali, Islamist rebels have swiftly captured the north of the country, and the ineffective Malian army has been unable to quash the rebellion. Because the rebels were moving south, the French have intervened, and so rebels sympathetic to the Malian rebels seized the Algerian oil installation in response.

That the French are involved wakens all those old colonial memories; there are probably more than a few Malians and Algerians who don’t welcome the reappearance of French soldiers on their soil. Nor are they likely to be happy about the brutish rule of the rebels, who have reportedly wrecked historic buildings in the fabled city of Timbuktu, much as the Taliban wrecked the giant Buddhas carved into the cliffs of Bamyan, Afghanistan.

These are not happy alternatives: corrupt and ineffective central governments, often allied with old colonial powers vs. brutish, puritanical religiously inspired rebels. Ansary in his book about Afghanistan offers another potential road through this minefield. He describes Afghanistan, even in the countryside, becoming acquainted with the modern world on its own terms. He hopes for a neutral Afghanistan finding its own way.

Throughout the Muslim world people are searching for a way that is respectful of local tradition and culture while also absorbing what it can of the modern world.

Hostages in the Sahara are part of this larger struggle, and there will be no quick resolution of the conflict. The attacks of Sept. 11, 2001, awoke the American people to this struggle in dramatic fashion, but the struggle, among Malians, Algerians, Egyptians, Syrians, Iraqis, Iranians, Afghans and many more, is far from over.