Afghanistan's defence ministry says it has detained or removed hundreds of soldiers from its military's ranks as part of an investigation into their backgrounds, after a surge in insider attacks against foreign forces.

A ministry spokesman, Mohammad Zahir Azimi, did not provide any other details or exact numbers. He said many of the soldiers had been forced out because they had either incomplete or forged documents. He did not say whether any were connected to the Taliban or other insurgent groups.

Azimi said the investigation had begun about six months ago, and more information would be released next week. On Sunday the British deputy commander of the Nato coalition, Lt Gen Adrian Bradshaw, confirmed that a number of soldiers had been suspended.

The US and its allies want Afghan forces to take over security by the end of 2014. That effort has been imperiled by the spike in insider attacks, which have killed 45 international service members this year, most of them Americans.

There were at least 12 such attacks in August alone, resulting in 15 deaths. Coalition officials have said about 25% of this year's insider attacks had confirmed or suspected links to the Taliban. The militants have sometimes infiltrated the ranks of the Afghan army and police and in other cases are believed to have coerced legitimate members to turn on their coalition partners.