First, the fundamentalists banned music in a country with one of the richest musical traditions in the world. Last July, they stoned an unmarried couple for adultery. The woman, a mother of two, had been buried up to her waist in a hole before a group of men pelted her to death with rocks. And in October the Islamist occupiers began compiling lists of unmarried mothers.

Even holy places are not safe. These self-styled “defenders of the faith” demolished the tombs of local Sufi saints in the fabled city of Timbuktu. The armed groups also reportedly destroyed many churches in the north, where displaced members of the small Christian minority told me they had previously felt entirely accepted. Such Qaeda-style tactics, and the religious extremism that demands them, are completely alien to the mainstream of Malian Islam, which is known for its tradition of tolerance.

That openness is exactly what the jihadists seek to crush. “The fact that we are building a new country on the base of Shariah is just something the people living here will have to accept,” the Islamist police commissioner in the town of Gao said last August. Until military action began this month, local citizens were on their own in resisting the imposition of Shariah — and they fought back valiantly. A radio journalist was severely beaten by Islamist gunmen after speaking on the radio against amputations. Women marched through the streets of Timbuktu against Islamist diktats on veiling until gunfire ended their protest.

The acting principal of a coed high school in Gao told me his school had been occupied by militants from the Movement for Unity and Jihad in West Africa. They announced that they had come to protect the premises. Instead, they quickly stole its computers, refrigerators and chairs. “We consider ourselves under occupation,” the principal told me. “We consider ourselves martyrs.” He has risked his life to keep his school open, to continue to educate boys and girls together, though he must put them on opposite sides of the classroom now. “My presence creates hope for my students. I cannot kill this hope,” he told me.

Since the jihadist takeover, Gao’s economy has come to a standstill. Every Thursday, there are theocratic show trials in Arabic, a language many residents do not speak. The fundamentalists focus on teaching the predominantly Muslim population of Gao “how to be Muslim.” Like Al Shabab in Somalia and the Taliban in Afghanistan, they have a morality brigade that patrols the city, checking who is not wearing a sufficient veil and whose telephone sins with a musical ringtone. Speaking to a woman in public is an offense; this ban has caused such terror that some men flee in fear if they simply see a woman on the street.

The principal had been attending public punishments to document the atrocities. This meant repeatedly watching his fellow citizens get flogged. He has seen what it looks like when a “convict” has his foot sawed off. Close to tears, he said: “No one can stand it, but it is imposed on us. Those of us who attend, we cry.”

Some local and international opponents of military intervention have advocated negotiation with the rebel groups as an alternative. But negotiating with groups who believe they are God’s agents and whose imposed mode of governance is utterly alien to the people of northern Mali is unlikely to succeed, especially while the north remains occupied. “The population is not for the Shariah” is the refrain I heard again and again — from those displaced from Timbuktu and Kidal; from women and men; from Muslims and Christians. The preservation of Mali’s tradition of secularism is essential for them all.

Policy decisions regarding this potential Afghanistan-in-the-Sahara must be informed by the fact that what is happening there is not simply a question of regional or global security, but of basic human rights. The current intervention in Mali could deal a decisive blow to the recent advance of fundamentalism across North Africa, but only if French and West African soldiers take care to distinguish between civilians and their jihadist oppressors, who hide among the innocent.

They must also avoid simply shifting the problem elsewhere in the region. After all, one of the causes of the Islamist occupation of northern Mali was the displacement of armed men from Libya after the overthrow of Col. Muammar el-Qaddafi in 2011. Algeria had lost hundreds of thousands of its own people to fundamentalist armed groups since the 1990s. Since then, many Algerian jihadists have crossed the border into northern Mali, reproducing the problem there.

Some Malians fear that foreign intervention may have grave consequences for their homes and livelihoods. But most of the displaced northerners I met last month, before France intervened, had already decided that “the risks of nonintervention are 10,000 times worse than the risks of intervention,” as a women’s rights activist told me in Bamako. Or, as a young refugee from Gao whom I met in Algeria put it: “We do not want war, but if these people don’t leave us alone, we have to fight them.”

Karima Bennoune, a WLUML Board member and professor of international law at the University of California, Davis, is the author of the forthcoming book “Your Fatwa Does Not Apply Here: Untold Stories From the Fight Against Muslim Fundamentalism.”