Image copyright AFP Image caption The Taliban have mounted several recent high-profile attacks, including a brief takeover of strategic Ghazni city

Huge death tolls that would once have made headlines are becoming commonplace in Afghanistan, as the Taliban and other militant groups flex their muscles daily against a US-backed military struggling to cope.

There remains no clear end in sight for a war that has turned into a bloody stalemate, as the BBC World Service's Dawood Azami explains.

Is the violence getting worse?

Since the US-led invasion in 2001, Afghanistan has never been as insecure as it is now. The Taliban control more territory than at any point since the removal of their regime 17 years ago.

The Afghan war has already become the longest war in US history. With the passage of time, the conflict has not only become more intense - it has also become more complicated. The attacks are becoming bigger, more frequent, more widespread and much deadlier. Both sides - the Taliban and the US/Nato-backed Afghan government - are trying to gain the upper hand.

On 10 August, the Taliban entered Ghazni, a strategic provincial capital on a key highway south of Kabul, before the Afghan security forces supported by US advisors and air strikes pushed them back. On 15 May, the Taliban entered the capital of Farah province in western Afghanistan, close to the Iranian border.

Many Taliban fighters are killed and injured as they are pushed back after attacks on provincial capitals, but such attacks have a huge propaganda value for the group and boost their morale and recruitment. The insurgents also take weapons and vehicles with them as they retreat. Many other towns and district centres remain under constant Taliban threat.

Large parts of provinces like Helmand and Kandahar - where hundreds of US, UK and other foreign troops were killed - are now under Taliban control. Meanwhile, civilian casualties are at an unprecedented level. According to the UN, more than 10,000 civilians were killed or injured in 2017, and the number is expected to be even higher in 2018.

Is the Trump strategy making any difference?

It has been a year since President Trump unveiled a new strategy for Afghanistan, vowing that the US would "fight to win". The Trump administration has sought to put pressure on the Taliban in four ways to break the stalemate, roll back the group and eventually force them to sit down for talks with the Afghan government.

Maximum military pressure, especially through intensified airstrikes and special forces raids. Several thousand more US military personnel have been deployed, bringing the total on the ground to around 14,000. Last October, the then commander of US forces, John Nicholson, said a "tidal wave of air power" would also be unleashed and that this was "the beginning of the end for the Taliban". Targeting the Taliban's financial sources, including bombing opium production plants which are reportedly taxed by the Taliban and curbing the cash flows to the group from abroad. Publicly questioning the legitimacy of the Taliban's war, including among religious groups. Putting pressure on Pakistan to capture or expel Afghan Taliban leaders allegedly based on its soil.

But these efforts have largely failed:

The intense military pressure has slowed the Taliban's territorial expansion and many Taliban fighters (including a few important commanders) have been killed over the past year. But the group has managed to hold its territory and retain its operational capacity to carry out deadly attacks across the country. On the other hand, the intensive aerial strikes have been criticised for causing civilian casualties.

Despite the bombing of drug labs, the Taliban don't appear to be facing a financial crisis. In fact evidence on the ground suggests their wealth has grown.

Islamic scholars have held various meetings, including in Indonesia and Saudi Arabia, during which the violence in Afghanistan was condemned and the Taliban were asked to enter into peace talks with the Afghan government. But the Taliban simply denounced these as being part of an "American process" to justify Washington's war.

The Trump administration has taken a tough approach with Pakistan and suspended security assistance and aid. Islamabad, which denies helping the Taliban, has said it is ready to help start an Afghan peace process. But there are few signs of a paradigm shift in Pakistan's Afghanistan strategy.

Counting the cost of Trump's air war in Afghanistan

Why are more troops going to Afghanistan?

What's driving the war?

There are five major factors responsible for the intensification of the Afghanistan conflict.

Both sides are trying to break the stalemate in their favour. Each side wants to increase its influence and seize more territory. There are questions about the effectiveness of the US strategy and the lack of policy clarity since 2001. Tens of thousands of Taliban fighters have been killed, injured or captured since 2001, but their insurgency is not showing any signs of weakness. A decade ago, the US and Afghan governments estimated that there were around 15,000 insurgents in Afghanistan. Today, the estimated number of militants exceeds 60,000. The emergence of the Islamic State's Khorasan branch in Afghanistan and Pakistan has taken the level of violence and brutality to new heights. The new group has claimed some of the deadliest attacks, mostly on civilian targets in urban centres. As the idea of peace talks has gained momentum, the Taliban want to maximise their leverage and speak from a position of strength at the negotiating table. The increasing tension between the US and regional players - especially Pakistan, Russia and Iran - is also having a negative impact. American and Afghan officials have accused these three countries of supporting the Taliban, which they deny.

Image copyright EPA Image caption Taliban militants pose with an Afghan Army soldier during a three-day ceasefire in June

Can Afghan forces cope?

Given the high frequency and spread of Taliban violence, the Afghan security forces are overstretched and, in some cases, overwhelmed. Afghan forces have been fighting hard to stop the Taliban's expansion. But their casualty rate remains alarmingly high and appears to be increasing. Questions have been raised about the lack of robust and inspiring leadership, the timely supply of logistics, and corruption.

The bickering between political and government leaders in Kabul is also having a negative impact on the smooth running of the government and the security situation.

The two factions who formed the National Unity Government (NUG) after the 2014 presidential election have not yet truly united. Despite being in power for four years, the government in Kabul remains internally divided on several issues.

Can elections really be held?

Parliamentary polls, which have already been delayed by more than three years, are scheduled for 20 October 2018. The increasing violence has fuelled speculation over whether the elections will be held on time. There are already concerns about widespread fraud and pre-poll manipulation.

There are also questions about how representative the next parliament will be if polls are not conducted in many parts of the country due to violence and intimidation.

Presidential elections, which are due to take place in April 2019, will be an even bigger challenge.

If not handled properly, both elections will test the strength of government institutions and pose a big challenge for overall political stability in Afghanistan.

Media playback is unsupported on your device Media caption The BBC gained rare access to see life under the Taliban in 2017

What about peace talks?

All sides now seem to be convinced that the conflict in Afghanistan cannot be solved by military means alone. A consensus is slowly building to start talks, with all parties saying that they want a negotiated settlement.

A window of opportunity opened after an unprecedented three-day ceasefire in June, followed by a meeting between US officials and Taliban representatives in Qatar in July. This was the first time in seven years that the two sides met for face-to-face talks. They are scheduled to meet again soon. It is an acknowledgement that, despite the aggressive US military campaign, no one side can win the war.

But there are still disagreements over the format, included the parties and framework for comprehensive peace negotiations. For meaningful progress to be made and trust to be built, compromise and flexibility will be required from all sides.

The other major challenge is the co-operation of regional players. Peace in Afghanistan and the wider region can only be achieved through a multilateral mechanism involving the US as well as major regional players, including Pakistan, Russia, Iran, China, India and Saudi Arabia. But in the end, it will be the dialogue among Afghans themselves which will determine the political future of their war-torn Afghanistan.