In the past five years, the West African nation of Mali has suffered through a military coup, an attempted countercoup and the eruption of a major insurgency in the northern part of the country. But the capital, Bamako, still pulses with the culture of music, from traditional kora and ngoni to slow Songhoy Blues jams and from Touareg rock to West African hip-hop. Two festivals ran concurrently there last month, the Festival Acoustik de Bamako and a Dogon heritage festival.

Meanwhile, Egypt is in the midst of the most invasive crackdown on citizens in its modern history, five years after the overthrow of the dictator Hosni Mubarak. Thousands of people have been killed, and tens of thousands have been imprisoned, tortured and disappeared. Police are breaking into people’s homes around Cairo’s Tahrir Square and searching their Facebook and email accounts, looking for anyone who might still espouse the goals of the Jan. 25, 2011, revolution. On once occupied streets, the music has gone silent. In the Sinai desert, an anti-government insurgency rages on, but the government has little incentive to end it, since it functions as a justification for suspending freedoms.

Why are these two countries in opposite circumstances five years after what should always have been understood as an Afro-Arab Spring? In theory, the situation should be the reverse. Egypt’s GDP per capita is triple Mali’s; its human development index rating, literacy rate and level of industrialization are almost double; and its life expectancy is 20 years longer. Egypt has a relatively educated population and a historically strong state that at least has the potential to govern and develop the country. For its part, Mali remains by almost every measure one of the poorest countries on earth.

The two countries both contain ungoverned desert regions, home to disaffected and marginalized populations who for centuries have been engaged in long-distance trade outside the bounds of state control. More recently, as the level of state neglect and broken promises became intolerable, foreign-influenced religious insurgencies have been able to infiltrate and take over some of these areas.

Mali is certainly not the economic African success story it was once described as, and its government and security forces are not free of corruption and abuse. Yet it is experiencing a renewed democracy and a cultural renaissance, both pitted against the religious extremism that nearly ripped the country in half. In Mali some of the most beautiful, complex and virtuosic music on earth is being weaponized in the struggle against Islamist extremism.

Minister of Culture N’Diaye Ramatoulaye Diallo explained why her government is so interested in supporting music, saying, “Our way to be back onto the world stage is our music … our oil.” Music is at the heart of Mali’s attempt to secure international support; there are over 10,000 troops from 47 countries as part of a United Nations peacekeeping mission in Mali. The government wants to ensure the pacification of Islamic rebels, a continued peace process with potential separatists in the north, a reduced degree of alienation between the elite and the mass of citizens, a strengthening of civil society and a diminishing of regional cleavages.