As lethal mayhem persisted outside Kabul airport, with thousands of terrified Afghans trying to flee, the Taliban have reached out to a former Afghan president, Hamid Karzai, and to Russia in an attempt to fulfill their pledge to form an “inclusive” government and defeat holdouts against their rule.

Little in the Taliban’s history suggests readiness to compromise on their harsh Islamist principles or to share power, but the United States has warned the militant group that going it alone will result in continuous conflict and isolation. In this context, Mr. Karzai, who led the country between 2001 and 2014, has tried to put himself forward as a mediator, albeit one under increasingly strained circumstances.

Mr. Karzai, 63, a wily maneuverer who as president fell out with the United States over American drone attacks, corruption allegations and other issues, has stepped into the void left by the flight a week ago of President Ashraf Ghani. He has met with Taliban leaders, including Khalil Haqqani, who has been designated as a terrorist by the United States, and is working closely with Abdullah Abdullah, the head of the former Afghan’s government’s peace delegation.

A Taliban leader described as the acting governor of Kabul, Mullah Abdul Rahman Mansour, talked over the weekend with Mr. Karzai and Mr. Abdullah. A growing number of senior Taliban have been seen in Kabul in recent days to discuss the shape of the next government, among them Mullah Abdul Ghani Baradar, the Taliban’s chief diplomat and a senior official in the group’s government in the 1990s.