A cellphone photo of Moussa Konaté, a security guard at the Radisson Blu Hotel in Bamako, Mali, who was killed by extremists after he helped guests escape an attack on Nov. 20, 2015. (Jane Hahn/For The Washington Post)

Two years after French troops drove jihadist forces from northern Mali, a deadly attack on a luxury hotel has raised concerns that Islamist extremists are gaining ground again in this volatile country, despite a new peace accord among domestic rebel groups.

While Malian and U.N. officials point to the peace agreement as a potential milestone in pacifying the lawless, Arab-dominated north, they also worry that violence could surge again. The weak central government is struggling with a host of challenges: entrenched poverty, drug smuggling, and a mix of growing competition and collaboration among Islamist factions in the West African region.

“Mali today is as fragile as it was before the coup in 2012,” said Peter Pham, director of the Africa Center at the Atlantic Council in Washington, referring to the military power grab that occurred as a rebellion in the north gained strength. France intervened the following year, after Islamist fighters seized control of a large chunk of territory.

“The French may have prevented an Islamist takeover, but you can’t rebuild a hollowed-out state in two years,” Pham said. “The borders are fictional, and there is a fluid and permeable dynamic among jihadist, rebel and criminal groups in the region. We are still playing Whac-A-Mole.”

[Mali’s president declares state of emergency after hotel attack]

Few people predict that this nation of 17 million people will become an Islamist beachhead again. But both Malian and foreign observers worry that extremist groups based in surrounding countries could still create turmoil, by capitalizing on domestic discontent here and on the momentum from recent terrorist attacks in Paris and elsewhere.

Two jihadist groups have asserted responsibility for last week’s attack on the Radisson Blu Hotel, which left at least 20 people dead in the bustling capital, hundreds of miles from the vast desert region where Islamist militias normally operate. Experts differ on the possible motive, with U.N. officials insisting the attack was an effort to derail the peace talks and others suggesting it was part of a new muscle-flexing rivalry between pro-al-Qaeda and pro-Islamic-State groups in the region.

There also are conflicting opinions about the best way to contain the possible comeback of Islamist extremism after two years of rule by the government of President Ibrahim Boubacar Keïta, which is widely described as democratic but sluggish and corrupt.

Some look to the 8,000-member Malian army to enforce security, although it is thinly spread and in dire need of reform and training as well as equipment and funding, analysts say. Others say the key lies in quickly bringing development, services and jobs to the long-abandoned north, calling this the only way to prevent large numbers of unemployed young Muslim men — as well as older ex-rebels from various tribal separatist groups — from being recruited by well-financed jihadist groups.

“It is a great achievement that the combatant groups have been brought together and speak with one voice, but we need to bring peace dividends — water, electricity, roads, schools — so the population sees peace making a difference in their lives,” Mongi Hamdi, the U.N. special representative for Mali, said in an interview. “That is the glue that will keep people attached to peace.”

Mali is heavily dependent on the international community for security and economic survival. A U.N. peacekeeping force with more than 10,000 troops is stationed here, and a smaller French counterterrorism force has been based here since 2013. Large amounts of development aid have come from the United States, France and other countries. Some critics say the funding has been partly wasted through corruption, but Hamdi and others argue that even more is needed to reinforce the writ of the state in conflict areas.

Until now, Mali has been viewed largely as suffering from the predations of extremist groups spawned in neighboring countries. Libyan militants thronged into northern Mali after dictator Moammar Gaddafi was overthrown in 2011, and a notorious Algerian jihadist leader named Mokhtar Belmokhtar formed the group al-Mourabitoun that most experts believe planned the Nov. 20 hotel attack.

The Washington Post’s Kevin Sieff talks about the extremist threat in West Africa and why the U.N. peace keeping mission there is now the agency’s most dangerous. (Kevin Sieff and Jason Aldag/The Washington Post)

In recent months, experts said, the regional jihadist constellation has changed. At least one new group in Mali, the Massina Liberation Front, has emerged with possible outside help; it was one of the groups that claimed to have carried out the hotel attack. As the Islamic State has begun to eclipse al-Qaeda in its global reach, smaller jihadist groups in the area have reportedly shifted or cemented alliances with one side or the other.

Several international officials and experts said that what happens in Mali in the coming months could reinforce either modernizing or more extreme trends in the region.

“Mali is at center stage now. It is a huge country that borders seven others, and it can influence all of them,” Hamdi said. “The international community needs to take the situation more seriously. If Mali is lost, it will change the mind-set of the region. Then the bloodthirsty barbarians will start attacking everywhere.”

A former French colony whose population is 95 percent Muslim, Mali has a tradition of moderate Islamic values mixed with Christian influence. But government corruption and neglect have soured many Malians on secular politics, several experts said.

“We have a secular state and constitution, but people resent bad governance and corruption,” said Adam Thiam, a columnist for Le Républicain newspaper here. “Why do we have jihad? Because we are trying to build a modern state without the consent of the people. If there is not more international vigilance over the corrupt state system, we are going to see more human bombs.”

A separate problem that also has become intertwined with violence and religious extremism in Mali is a thriving drug trade. Each month, millions of dollars in cocaine, hashish and other drugs arrive in Mali from global producers in places such as Colombia and Southeast Asia, and are smuggled north into Algeria and beyond. The trade involves armed rebel groups as well as jihadist militias, which use the profits to pay fighters and buy weapons.

[Anita Datar is the only known American killed in Mali. She was there to help.]

“Drugs are at the heart of instability in the north. The smugglers don’t want peace because it interrupts their business, and if we don’t stop that business, stability will never last,” said an international official here who spoke on the condition of anonymity because he is not authorized to talk to the news media.

Taken together, this array of problems — new rivalries and alignments emboldening jihadist attackers, popular disillusionment with the government, lack of resources to shore up the promises of peace in the north, entrenched criminal networks and signs of spreading ultraconservative Islamist influence — threaten to undermine the hopeful moment created by the peace accords signed in June.

“There is still a positive peace dynamic, but the state is weak and corrupt, and we have only had a democratic government for two years,” said Mahamadou Camara, a magazine editor and former press official in the Keïta administration. “The greatest risk we face today is that the positive momentum will reverse into a new spiral of violence.”

Read more:

Malians defy the threat of terror

Five things you should know about Friday’s terrorist attack in Mali

Anita Datar is the only American killed in the Mali attack. She was there to help.