Updated

Afghanistan is rolling out an ambitious plan to spy on its own soldiers, the most serious attempt so far to halt a string of attacks by Afghan troops on their Western comrades-in-arms, according to Afghan and American military leaders.

As part of the effort, agents of the National Directorate of Security (NDS), the country's spy agency, will be deployed to army units across the country to monitor Afghan soldiers at every step, from recruitment and training to deployment and home leave.

The intent is to identify and weed out any potential troublemakers before problems turn deadly, Afghan Defense Minister Gen. Abdul Rahim Wardak said in an interview. "Every soldier has to become an informer," he said.

So-called green-on-blue attacks by Afghan servicemen on coalition personnel claimed at least 77 lives in the past five years, with three quarters occurring since early 2010. Last year, an analyst for the US military warned that the attacks were turning into a "growing systemic threat" to the mission, in a study that has since become classified.

US Marine Gen. John Allen, commander of the International Security Assistance Force in Afghanistan, said the Afghan government was taking "unprecedented steps" to address the problem following the killing of four French soldiers by an Afghan service member on Jan. 20. That incident, in Kapisa province, prompted Paris to accelerate the withdrawal of its troops.

Afghan and American officials say they realize that sowing distrust between ISAF soldiers and their Afghan counterparts has become a Taliban strategy.

"They recognize that the real center of gravity on our side, the thing that holds us together, gives us our strength, is the relationship between Afghans and ISAF," said US Army Lt. Gen. Daniel Bolger, commander of the NATO Training Mission-Afghanistan. "They are going to continue to attack that."

As part of the new effort, NDS agents will keep watch on new recruits, conduct more thorough background checks than the Afghan army can currently undertake, monitor the young soldiers as they go through training, and embed in military forces with soldiers at their bases, officials said. The plan will include both uniformed Afghan intelligence officers mingling with the units and covert operatives among the soldiers who will report back to the NDS, officials said.

NDS will also attempt to keep an eye on Afghan soldiers when they go on leave. Military commanders are especially concerned about soldiers who return home to Taliban-infiltrated areas of Afghanistan and visit parts of neighboring Pakistan where the insurgent leaders plot their strategies.

Click here for more on this story from The Wall Street Journal.