Challenges ahead for Afghan security forces
A major international conference on Afghanistan has backed President Hamid Karzai's timetable for control of security to be transferred from foreign to Afghan forces by 2014. The BBC's Ian Pannell in Kabul looks at the chances of meeting that goal.
By most estimates the security situation across the country looks increasingly bad.
Violence continues to rise and June was the deadliest month in nearly nine years of war.
According to the UN, the number of roadside bombings rose by nearly 100% in the first quarter of this year compared with 2009.
Assassinations rose by half and suicide attacks doubled. More than 1,000 people died in the first six months of the year, with June being the worst so far for foreign troops.
But military commanders and the politicians who gathered in Kabul on Tuesday think they are on the right track.
Their argument is that the rise in violence is an expected but temporary result of a surge in troops that has deliberately and sometimes aggressively targeted the Taliban in their havens.
They think that security is improving for people who live in the south and east, because increasing numbers now live in areas controlled by the government and its troops rather than by insurgents.
Officials are also upbeat about the increasing numbers and capabilities of Afghan police and soldiers.
Local security forces live, work and fight alongside foreign troops and even lead some operations.
But both the police and the army have problems with desertion, illiteracy, drug abuse, a lack of representation from the majority Pashtun ethnic group, as well as poor supply and logistics.
Even more worrying is that corruption among the police in particular is commonplace. They are simply not trusted by the people they are supposed to protect.
They may be more capable than they were, but only a quarter of the army is really battle-ready.
The latest incident of an Afghan turning his weapon on his trainers at a base outside the northern city of Mazar-e-Sharif on Tuesday will also raise concerns that the Taliban are capable of infiltrating security forces.
Investigations are under way into how the previous attack killing three soldiers from the Royal Ghurkha Rifles was allowed to happen, and screening procedures are being reviewed.
To win, the Karzai government and Nato's Isaf contingent must weaken or defeat the Taliban, build local government with popular support and put an end to the corruption that feeds disaffection.
If they are to meet the timetable of 2014 set out at the conference, they have to create an Afghan force that is large enough and capable enough to take control of security.
They have had nine years to achieve these things and the progress has been modest.
They have now given themselves four more years to finish the job. It is not an impossible target, but it is a highly optimistic one.