In modern history there is only one occasion when a foreign power has defeated this type of domestic insurgency. This was the British led fight against the communist uprising in Malaya in the 1950s. they won because they were able to seal the Malay/Thai border and in pre-independence Malaya, they also controlled government.
In Afghanistan the Afghan/Pakistan border was porous. Taliban fighters could withdraw to Pakistan for rest and relaxation to then return refreshed and reequipped for battle.
In terms of government control an attempt was made to import an alien form of Western democracy. In the process real power was surrendered in 2002. At a Loya Jirga (a type of tribal leaders’ consultation) to gain consensus, it was agreed that local chieftains would draw on central government allocations ensuring they would be the principle financial beneficiaries of government resources. The companion of the devolution of unaccountable power was, in Western terms, widespread corruption. While some changes could be effected, societal foundations would remain unchanged. Additionally the foreign forces were all from “infidel” nations. Sharia Law could never permit its continuance.
With expenses and military fatalities rising and diminishing hope of what Western politicians would regard as a good outcome, President Obama announced an American troop withdrawal. Advisors then persuaded him to “temporarily” increase America’s military commitment. President trump accelerated the withdrawal. President Biden set the final date to end the process.
In 2009 when American military authorities learned that some of their troops were carrying Bibles in the Pashtun language to give to local people the confiscated and burned every copy. To boost further the Karzai government’s Islamic credentials, in 2010 the International Security Assistance Command (INSAF) initiated a request for and publication of a fatwa (religious ruling) decreeing the death penalty for males leaving Islam. Local Muslim scholars were happy to oblige. The penalties were duly confirmed.
The four law schools of Sunni Islam–Hanafi, Malaki, Shafi’l and Hanbali together with the main Shia law school, Jafari, all prescribe the death penalty for apostasy. Apostasy is regarded as treason against the Muslim State and the world wide Ummah, i.e. all Muslims. Sharia provisions for sane apostate females are that they are to be imprisoned.
In INSAF actions were a vain attempt to demonstrate their determination not to disrupt anything relating to Afghanistan’s culture and religion. It was also an attempt to gain acceptance by contesting power brokers.
The smallest of the minority tribes in Afghanistan is the Shiite Hazara who are regarded as heretics by all other Sunni tribes. Thus, they and their distinctive mosques are frequently attacked, especially by the dominant Pashtuns among whom the Taliban were formed.
To be continued.