This article first appeared in Foreign Policy.

The recent decision by Afghan President Hamid Karzai to release dozens of prisoners, many of them hardened insurgents, is only the latest of his actions that have angered and confounded Western and even many Afghan observers. Everyone is scrambling to understand Karzai's motives, given his repeated incendiary remarks aimed toward the United States and, above all, the new obstacles he has set in place against the Bilateral Security Agreement (BSA). Many explain Karzai's behavior as that of a cunning negotiator, a committed nationalist, or even a borderline paranoid. Yet analysts tend to remain confident that Karzai understands the likely dire consequences for Afghanistan if he forces a total American troop withdrawal, and that he will thus know when to back off. The concern expressed by these observers is that Karzai may underestimate the negative impact of his behavior on a Washington grown tired of its Afghan commitments, and as a result will wait too long to sign the BSA.

But could we be reading Karzai incorrectly? Is it possible that rather than trying to call Washington's bluff in a high stakes game, he is prepared for and even eager to have no American military presence in Afghanistan? What if Karzai is in fact persuaded that the United States seeks to perpetuate the Afghan conflict and is conniving with Pakistan to divide the country? Could it be that Karzai has come to believe that Afghanistan has alternatives to its American military dependence that offer greater promise of weakening or possibly ending the insurgency? Has he concluded that with foreign troops gone, he can count on Iran, India, China, and Saudi Arabia for support, and that the chances for a negotiated peace will improve? And might Karzai also be convinced that Afghans are more likely to resolve their internal political differences if freed from U.S. interference? Interestingly, Karzai's views on the BSA and other issues happen to mirror the thinking of the political and military wings of Afghanistan's Hezb-i-Islami. Arguably, Karzai has wittingly or unwittingly aligned himself with this radical Islamic party.

The circumstantial case is strong. Karzai's powerful chief of staff, Abdul Karim Khoram, and several of his closest advisors, including Ministers Umar Doudzai and Farooq Wardak, are known to have strong connections with Hezb-i-Islami's political wing. Khoram serves as gatekeeper for the president, controlling who he meets and the information he receives. They, among others, help shape Karzai's worldview by feeding his well-known appetite for conspiracy theories. The influence of Hezb-i-Islami also reaches into the bureaucracy, and its members are well represented in the national and several provincial assemblies.

The differences that exist between the political and military arms of Hezb-i-Islami are not so much of doctrine as of tactics. Both owe their core beliefs to the party's founder, former mujahideen leader Gulbuddin Hekmatyar, who has been at war with the Kabul regime and international coalition since 2001. But unlike Mullah Mohammed Omar's Quetta Shura and the Haqqani network, the other principle insurgent groups, Gulbuddin's Hezb-i-Islami (HIG) has for several years sought to reach an agreement with the Karzai government that would result in joining the Afghan political process.

Discussions have always been hung up, however, by the HIG's insistence that all foreign troops leave the country before it will lay down its arms. Perhaps because a full departure of international forces now looms as a possibility, HIG fighters have not mounted a single serious attack since mid-September 2013. Intermediaries for Gulbuddin have already become involved in April's presidential elections. In early November 2013, a Hezb-i-Islami party member who negotiates on behalf of Gulbuddin with the Kabul government led a delegation that also met privately with Abdullah Abdullah and Ashraf Ghani, the two leading candidates for the presidency. A former deputy leader of Hezb-i-Islami's political wing is now the candidate for first vice president on Abdullah's ticket, and a former party spokesman is among the 11 cleared to contest for the presidency in April. Any doubts about HIG's break with the Taliban over the elections were erased on Jan. 13 with Gulbuddin's call for Afghans to vote in the upcoming contests.

Although barred by the Afghan constitution from seeking reelection, Karzai seems determined to remain influential and relevant. Almost certainly a high priority for the president is that the election's outcome not threaten his personal assets and those of his family. Karzai is also thought to be deeply concerned about his legacy, namely that he not be thought of as another Shah Shuja, the nineteenth-century Afghan ruler most remembered as a puppet of the British. Indeed, many of his actions seem designed to demonstrate his personal independence from his American patrons. Karzai may nonetheless feel confident that, even with the departure of foreign troops, the United States and the international donor community will continue their economic assistance to Afghanistan. However, he apparently is far less confident about the country's future without there also being progress toward a political solution.

Here is where Karzai may see Hezb-i-Islami as supplying the key to such a solution. A peace accord signed between Kabul and the organization would represent a significant defection from the insurgency. The entry of the party's militant wing into the political process could encourage the more pragmatic elements of Omar's Taliban to explore separate deals with the government and accelerate the reintegration of combatants. If, as most Afghans believe, Pakistan's leverage is critical to getting insurgents to negotiate seriously, then it is significant that leading figures in both wings of Hezb-i-Islami have long-established, close ties with Pakistan's premier intelligence agency, the Inter-Services Intelligence directorate. A Pakistan feeling confident that its national interests can be protected in a power-sharing arrangement in Kabul that includes Hezb-i-Islami might be persuaded to evict irreconcilable Afghan insurgents on its soil.

If the departure of foreign troops were to offer a path toward Afghan political conciliation and improved Afghan-Pakistani relations, the United States could hardly disapprove. But any agreement that returns Hekmatyar to Afghan politics is troubling. He is one of the most divisive figures in modern Afghan politics. His party's past human rights record is abysmal, and its return is also bound to revive bitter memories among Afghans of his destructive role in the civil war of the 1990s. A tie-up between Karzai, Pakistan, and Hezb-i-Islami could turn many ethnic elites in the north toward armed rebellion against Kabul. Washington should also be apprehensive about negotiations with a party that has never deviated from being bitterly anti-American and whose ideology has always been likened to the Muslim Brotherhood.