The Taliban has refused peace talks for years, hoping that one day it will capture Kabul, remove a democratic government, and form an extreme regime in the country as they did in 1996. But Afghanistan is stronger today than it was back then: at that time the institutions were entirely destroyed during the civil war and there was no army. But now they are functional, with 314,000 Afghan army and police as well as 22,000 foreign troops.

The Taliban is still able to conduct high-profile attacks in Kabul and capture some parts of other cities. But it cannot be kept in one area of the city for long while ordinary people as well as its own members are being affected.

Since 2003, the Taliban has continuously striven to attack various cities in order to establish a base from which it can easily maximise its power throughout the rest of the country – but it has yet to succeed.

In September 2015, the Taliban took back some parts of the northern city of Kunduz but it lost control of the province within a few days to US and Afghan forces.

Taliban disguised in burqas kill at least 13 by storming university campus

Last August, the Taliban launched a brazen attack to overrun a strategic Ghazni city but failed at that too. There is not a single provincial capital it has complete control over yet. Though the Taliban contested or controlled 40 per cent of Afghan territory, these are remote rural areas with very small populations.

There are several reasons behind the Taliban’s failure in recapturing Afghanistan by fighting and finally, that compelled it to take part in peace talks after 17 years of war.

There are four major ethnic groups in Afghanistan: Pashtun, Tajik, Uzbek and Hazara. The majority of the Taliban are Pashtun, have little support in Tajik and Uzbek communities, and no support in the Hazara community, as the Hazaras are Shia Muslims while the Taliban is a Sunni Islamic movement.

Similarly, almost 80 per cent of the central leadership of the Taliban is Pashtun, including the chief, Haibatullah Akhunzada, and his deputies, Mohammad Yaqub, and Sirajuddin Haqqani.

Pashtuns are also the victims of the Taliban’s war more than any other ethnic group. The conflict has largely continued in Pashtun areas. Their villages have been ruined – the Taliban burned the schools in these areas, ended educational opportunities for their children and killed their influential elders.

On the other side, the key government posts are also with the Pashtun. Both former and current Afghan presidents are Pashtuns, and the significant cabinet position of the current government is with the Pashtuns.

A large number of Pashtun politicians, tribal chiefs and intellectuals are against the Taliban, which is one of its biggest weaknesses.

The central, conservative ideology of the Taliban is also responsible for its failure, as it is unacceptable for most Afghans, particularly the literate population. With the establishment of Karzai’s interim government in 2001, Afghanistan progressed in every walk of life.

Dozens of government and private universities have been set up in these 17 years. Girls, who were banned from school during the Taliban government, now make up 39 per cent of public school students. Women’s political participation has also increased: they now have 69 out of 249 seats in the lower house of Afghanistan’s parliament, whereas the upper house has 27 women among its 102 members.

Despite fighting a war for 17 years and losing thousands of its fighters, the Taliban has failed to make any significant headway and has not managed to capture a single provincial capital.

The withdrawal of more than 100,000 Nato troops from Afghanistan in 2014 also means that the Taliban has lost its argument for war, because it argued the occupation of foreign forces which overthrew its government in 2001 was the main cause. Now the Afghans believe that the Taliban continued the war for no reason; the foreign troops pulled out in huge numbers and the remaining soldiers will leave after the peace talks have come to a conclusion.

Currently, the paramount challenge for the Taliban is the potential splintering of its relationship with Iran, Rusia and China, whereas before it only enjoyed strong ties with Pakistan. Leaders also fear that the rank and file will split into different groups, thus losing its sense of unity.

Moreover, the areas once considered the centres of the Taliban (Helmand, Kandahar and other southwest provinces) stopped being seen as such in 2010, when it lost control for good after supportive areas of the insurgency suffered more than normal, in terms of casualties, the breakdown of the education and damage to the economy.

The communities most affected by war not only prohibited the Taliban from making a disturbance in these areas, but also prevented their own people from taking part in the fighting.

Soon after controlling Kabul in 1996, the Taliban banned all television stations, newspapers and radio stations in order to keep people unaware of what was really happening. However, since the collapse of the regime in 2001, the media has flourished immensely, to the extent that today there are 83 private television stations, over 170 FM radio stations and hundreds of print media publications.

The media has played a key role in highlighting the cruelties of the Taliban on ordinary Afghans.

Politicians regularly argue that the Taliban began a war against the Americans but killed more Afghans than did the US. These kinds of discussions have created a big backlash against the Taliban.

Support free-thinking journalism and attend Independent events

In the past 16 years, Islamic religious scholars who had striven for peace and declared the war in Afghanistan illegitimate have been increasingly targeted.

Hundreds have been killed in Kandahar and Badakhshan provinces alone, many claimed by the Taliban. But by losing support within religious circles as well as the wider population, the Taliban’s position is getting weaker by the day.

Similarly, its aggressive attacks have diminished support in Afghanistan as it has violently targeted almost every social group indiscriminately. The hostility the Taliban faces from Afghans has kept it feeble.

With this in mind, it is not astonishing that a nationwide poll in 2015 found that 92 per cent of Afghans supported the Kabul government and only 4 per cent favored the Taliban.

Perhaps now the Taliban is closer to the realisation that it can achieve more from peace talks than wreaking havoc.