Washington, D.C.: President Barack Obama is seriously weighing a proposal to keep as many as 5,000 US troops in Afghanistan beyond 2016, according to senior US officials, a move that would end his plans to bring US troops home before he leaves office.

The proposal presented in August by Army General Martin Dempsey, then-chairman of the Joint Chiefs of Staff, would focus the remaining American force primarily on counterterrorism operations against Daesh, Al Qaida and other direct threats to the United States.

Obama has made no final decision on the plan, which was developed before the Taliban captured Kunduz in September; it was the first major city to fall to the Taliban since the war began in 2001.

Afghan security forces, supported by American planes and combat advisers, have since been able to retake most, if not all, of the city. But the initial collapse of the Afghan forces in Kunduz has fed long-standing worries that Afghan forces lack the necessary air support, logistics and intelligence capabilities to survive on their own after the US military leaves the country.

The 3,000 to 5,000 troops envisioned under Dempsey’s proposal would be part of an emerging plan for a global counterterrorism footprint, developed after the Daesh’s rampage through much of Iraq and Syria. Gen. John Campbell, the top US commander in Afghanistan, also has developed as many as five options for a post-2016 presence that range from a small embassy force to as many as 7,000 troops.

Dempsey’s plan, however, has been the primary focus of White House debates in recent weeks. Dempsey, who retired as Joint Chiefs chairman in September, spent his final month in office responding to a request from Obama to flesh out his initial proposal.

The Dempsey plan envisions the United States maintaining a few bases, perhaps two or three, that could be used as “lily pads” to launch strikes against groups that threaten the United States, senior defence and administration officials said.

The lily-pad bases would potentially house American drones and fighter jets as well as elite counterterrorism troops, and could be at Bagram airbase north of Kabul and one or two other airfields, said senior administration officials who spoke on the condition of anonymity to discuss internal planning.

The new plan would mark a major shift for the president, who appears to have abandoned his goal of ending the wars in Iraq and Afghanistan and is now searching for some “acceptable equilibrium, some minimal level of involvement, that avoids catastrophic reversals,” said James Dobbins, who served as Obama’s special representative for Afghanistan and Pakistan in 2013 and 2014.

Fourteen years after the September 11, 2001, attacks, the Taliban remains the largest of an array of militant groups operating in Afghanistan and just over the border in Pakistan’s tribal areas. Cells of Al Qaida fighters remain in the mountains of eastern Afghanistan, and a small presence of Daesh fighters, loosely tied to the militant movement in Iraq and Syria, has formed.

The sudden emergence of the Daesh after the US withdrawal in Iraq has raised concerns about it metastasising to Afghanistan. “There’s a feeling that we can’t afford to turn our back on this and allow it to grow,” Dobbins said. Maintaining a larger footprint would also make it easier for the United States to launch attacks in Pakistan, where the Obama administration has long conducted drone strikes on militant hideouts.

The additional troops are likely to be welcomed by Afghan President Ashraf Ghani, who has pressed the White House for more help in his war against the Taliban and others.

Several US officials said the plan is to make a final decision on the post-2016 force soon — a move that would give the United States’ Nato partners in Afghanistan more time to prepare for their own post-2016 commitments. But other senior officials insisted that no such plans exist and that no announcement or final decision from Obama is imminent. A military official said the president’s is expected to decide by the end of the year.

The president could choose to dismiss Dempsey’s proposal and stick with his plan to reduce the US footprint in Afghanistan to an embassy-based presence of about 1,000 American service members in Kabul, similar to the presence the United States maintained in Iraq after 2011. The White House has approved at least two changes to the departure plan Obama announced in May 2014.

After hearing the initial proposal, Obama told his commander that he was open to keeping more troops in Afghanistan but wanted Dempsey to bring him a more detailed blueprint, senior administration and defence officials said. Obama asked military commanders to work with intelligence officials to give him a better sense of the potential threat the Daesh and Al Qaida posed in the region over the coming years. The president also wanted a more detailed cost assessment of Dempsey’s proposal and the number of troops and civilians needed to support it.

One key concern for Obama was how many US troops it would take to protect the relatively small lily-pad bases from a major Taliban attack. The Taliban’s seizure of Kunduz and its gains in southern Afghanistan have heightened those worries.

“What you don’t want to do is leave a force that’s just big enough to provide a juicy target for the bad guys, but that’s too small to defend itself,” said a senior US official involved in the planning.

Obama has faced criticism from Republican lawmakers that his withdrawal plan didn’t recognise the shortcomings of the Afghan forces or the deteriorating conditions on the ground. Afghan troops have suffered casualties at an “unsustainable” rate over the last two fighting seasons, according to US military officials.