President Ashraf Ghani looks set to mobilize a new 20,000-strong militia to fight the Taliban in Afghanistan. The story of militias loyal to his former running mate and current vice-president, Abdul Rashid Dostum, should give him pause. Many of Dostum’s former commanders, who were armed to fight the Taliban, are now joining both the Islamic State and the Taliban.

Such defections are hardly the exception. Militias, once mobilized, are hard to disarm. When resources dwindle, they often seek new patrons and switch sides. By mobilizing a new force Ghani risks reinforcing, over time, the ranks of the very enemy he hopes to defeat. Today’s allies risk becoming tomorrow’s insurgents.

The new militia, the Afghan National Army Territorial Forces, whose mobilization reportedly enjoys U.S. and NATO backing, would be the latest in a string of informal forces sponsored by the United States and its allies in Afghanistan. As the Taliban encircle provincial capitals, the government needs all the help it can get. Locally recruited territorial fighters would hold areas recaptured from insurgents, freeing up the army for offensive operations.

The plan raises serious concerns, however. Pro-government militias have, in the past, preyed on local communities. This is one reason why the United States has trouble convincing European allies to fund the new scheme. Militias have also driven some of these communities to support the insurgency. Local strongmen have also used militias to fight rivals rather than the Taliban. Critics have pointed out that, despite claims that the Ministry of Defense would oversee the militia force (the Defense Ministry is generally seen as more capable than the Ministry of Interior that oversees the problematic current militia program, the Afghan Local Police), these problems are likely to repeat themselves.

But there is another way such militias risk making things worse and here the story of Dostum’s militias should serve as a cautionary tale. The political party he founded, Jombesh-e Melli Islami Afghanistan (National Islamic Movement of Afghanistan), is, despite its name, one of the country’s more secular parties. Yet many of Dostum’s former militia commanders are now joining the Islamic State and the Taliban in Dostum’s northwestern strongholds in Afghanistan.

Research for my forthcoming report for the U.S. Institute of Peace, which includes interviews with elders of a district in Jowzjan province that was briefly overrun by Islamic State in June this year, suggests that former Jombesh commanders and their fighters make up almost half of Islamic State forces in their area. Former Jombesh commanders are also well represented in Taliban ranks in this and other northwestern provinces, including neighboring Faryab.

Foreign powers repeatedly funded the mobilization of these men. First, under the Soviet-backed government in the 1980s, Dostum’s militias expanded from controlling one gas field to holding a swathe of northern Afghanistan. His network was eventually integrated into the army but his personal ties to his commanders always trumped their loyalty to any institution. Thus, when the Soviet army left Afghanistan and aid dried up, Dostum and his commanders defected en masse in 1992 to the mujahideen who fought the communist government the Soviets had abandoned.

By the time of the 9/11 attacks, Dostum had been mainly based outside of Afghanistan for years. His once mighty militia force had dispersed. The United States, not wanting to commit large numbers of ground troops to its 2001 invasion, found an enthusiastic ally in Dostum. With his coffers replenished with U.S. dollars, he quickly remobilized his men in northern Afghanistan for the new fight against the Taliban. Once the Taliban were ousted, his militias were integrated, much as they had been in the 1980s, into the army, or at least the Afghan Military Forces, which formalized anti-Taliban forces into security forces in the absence of a national army. Yet, again, Dostum’s men remained loyal to him, not to the military top brass in Kabul.

In the years after the Taliban’s ouster from Kabul, Dostum found his access to resources gradually diminishing. He was unpopular in Kabul, and when the Afghan Military Forces were demobilized from 2003 to 2005 to make way for a new and more professional army, many of his commanders found it harder to find employment than those from other factions (even though Jombesh was well represented in both Faryab and Jowzjan local administrations). Many had no option but to go home and wait for better times.

The next opportunity came with the Taliban’s expansion into northern Afghanistan, from about 2008 onwards. Looking to recruit from ethnicities outside their Pashtun base, the Taliban found willing recruits among Uzbek madrassa students and men that had fought with the Taliban in the 1990s. They also recruited from among disgruntled Jombesh (and from among some other unemployed former jihadi commanders).

This pattern was not limited to the Jombesh heartlands. Across the country, commanders left without livelihoods after demobilizing followed a similar path. Although assessing precise figures is hard, it is reasonable to assume that in every province with a Taliban presence some if not many insurgent commanders have, at some point since 2001, operated as pro-government commanders.

The 2014 Afghan presidential elections saw Dostum’s fluctuating fortunes take another turn for the better. He ran on Ashraf Ghani’s ticket and, when Ghani became president, Dostum became first vice-president. This gave him the opportunity to stack the police and state-sponsored local auxiliaries in his heartlands with former Jombesh. In 2015, on a visit to his home province Jowzjan, he announced the remobilization of thousands of commanders and fighters as ‘Popular Uprising Groups’ to battle the Taliban in neighboring Faryab and Sar-i-Pul. These men included many of those who had remained jobless after disarmament, demobilization, and reintegration efforts a decade earlier.

He did, however, complain that he could not make as many appointments as he should have been entitled to as vice-president; complaints that he accompanied with implicit threats of violence. Indeed, President Ghani did gradually sideline Dostum after assuming office, despite the latter’s pivotal support for his campaign. Dostum’s lot sank further this summer when he and his men were charged with assaulting a rival late last year. By May he had fled the country, citing the need for medical treatment. He has since been plotting his way back, thus far without success.

With Dostum absent, resources for those commanders he had mobilized against the Taliban in Faryab in 2015 and 2016 again dried up. Now many are joining the Taliban, an enemy they were fighting only a year ago, and contributing to its growing strength in the province, according to elders and other sources in Faryab who were interviewed for my USIP report. In five of Faryab’s districts, former Jombesh commanders reportedly fight in the Taliban’s ranks. In Qaysar, for example, Mohammad Zaman, a well-known former Jombesh commander in the area, now fights with the insurgency. In June this year, in Kohistan district center Lolash, 130 former Popular Uprising commanders and fighters also went months unpaid and found themselves without support against an advancing enemy. Eventually they gave up and switched sides. Commander Mohammad Ashraf from Almar district led a Popular Uprising Group a year and a half ago. Left without salaries for six months, he and his fighters decided to join the Taliban. He now calls himself Mullah Ashraf.

In neighboring Jowzjan, disgruntled Taliban commanders started a new front and called themselves the Islamic State Khorasan Province, not because of any ideological conversion but because of disputes between local Taliban factions over the taxation of the villagers and fights over who would be in charge. Afterward, some former Jombesh commanders switched to Islamic State after having first joined the Taliban. Others signed up directly. Elders from Darzab named ten Islamic State commanders with Jombesh backgrounds. Most command groups of a few dozen fighters. Islamic State, including those forces, reportedly now controls 90 percent of Darzab district. Taliban efforts to oust them from the district in October of this year failed.

This fluidity between groups that are nominally locked in bitter fighting reflects the often murky dividing line between allies and enemies in Afghanistan. On all sides men make a living with their gun.

It also reflects changing relations in Afghanistan between local powerbrokers and their militias, on the one hand, and communities on the other. In the past communities raised militias themselves to defend against intruders (including, at times, the state). Nowadays, however, political and financial support comes primarily from outside, mostly from Kabul and its foreign backers. This means local commanders are no longer accountable to communities, no longer controlled by them and no longer dependent on their support. They tend to join ranks with whoever pays their way or offers opportunities for security and profit. They change stripes fast, particularly as they are rarely fully integrated into the security forces. Such militias tend to be the first to lose out when funds dry up.

The lesson is clear: Arming new militias in Afghanistan is a dangerous game.

True, in some places militias have kept the Taliban — or those commanders that were at that stage fighting for the insurgency — at bay. Overall, however, arming thousands more men outside the formal security forces is a mistake, more likely over time to create problems and complicate efforts to withdraw U.S. troops. Recent history shows the risks not only of human rights abuses and militias becoming the personal fighting forces of local strongmen, but also pro-government forces, as resources run dry, joining the insurgency they were supposed to fight.

Better would be for the United States and NATO not to back the militia force, and to instead focus on supporting conventional security forces while redoubling efforts to find a political settlement among the various Afghan factions, including the Taliban, and regional powers.

The author is a doctoral fellow at the Geneva Centre for Security Policy, and has earlier this year completed a PhD on armed groups in Afghanistan for the War Studies Department of King’s College London. She is currently conducting research for an upcoming report of the United States Institute of Peace. Twitter @deedeederksen

Image: U.S. Air Force/Cecilio Ricardo via Wikimedia Commons