Editor's note: Peter Bergen, CNN's national security analyst, is a director at the New America Foundation, a Washington-based think tank that seeks innovative solutions across the ideological spectrum, and the author of the new book "Manhunt: The Ten-Year Search for Bin Laden -- From 9/11 to Abbottabad." Jennifer Rowland is a program associate at the New America Foundation.
Kabul, Afghanistan (CNN) -- Before dawn on Friday, a man wearing an Afghan uniform shot and killed three U.S. soldiers during a meeting to discuss local security issues in the southern province of Helmand.
It was one of an unprecedented series of five attacks by people in Afghan security forces uniforms in the past week against NATO forces.
If the trend over the past few months continues, NATO troops in Afghanistan face a rapidly growing threat. It is compounded by the strategy of withdrawing all combat troops by the end of 2014, which will increasingly leave relatively isolated international military advisors embedded with Afghan soldiers.
Attacks believed to be connected to Afghan security forces have already killed 34 NATO service members this year, drawing close to the record 36 international soldiers killed in similar attacks in 2011, according to data compiled by the New America Foundation.
Nineteen of the 34 NATO troops killed this year were U.S. soldiers, while 15 American service members were killed in such attacks in 2011.
These attacks now constitute 8% of the total number of U.S. soldiers killed in Afghanistan this year. In 2011, this number was closer to 4%.
The targeting of U.S. and other NATO soldiers by members of the Afghan security forces first spiked in 2009, and the number of incidents has gone up each year since.
In Friday's attack in Helmand, three U.S. Special Forces soldiers were killed. An Afghan official told reporters that a commander at a police checkpoint had invited them to a predawn meal and security discussion, where he opened fire on the Americans before fleeing to take refuge with Taliban militants.
"Now, he is with us," a Taliban spokesman claimed, identifying the attacker as a police commander named Asadullah who had been helping U.S. forces train Afghan policemen.
If this version of events is correct, the attack was premeditated and carefully planned -- likely with the help of the Taliban, who have claimed a role in about half of such attacks -- known as "green-on-blue" incidents -- since the beginning of the war.
A NATO military official tells CNN that, in fact, only 11% of such incidents can be definitively attributed to the Taliban.
The motivations of about half the attackers are difficult to classify because the perpetrator is either dead or has fled.
According to media accounts of such incidents, many of the "green-on-blue" attacks appear to have taken place after an argument between Afghan and international troops, or because of an Afghan soldier's personal grievances.
A Department of Defense report in April explains "investigations have determined that a large majority of green-on-blue attacks are not attributable to insurgent infiltration of the ANSF [Afghan National Security Forces] but are due to isolated personal grievances against coalition personnel."
In 2011, U.S. military behavioral scientist Dr. Jeffrey Bordin interviewed more than 600 Afghan soldiers and policemen and found they held overwhelmingly negative perceptions of Western soldiers.
The Afghan security forces aired grievances ranging from NATO soldiers' supposedly indiscriminate fire that killed civilians to the public searching of Afghan soldiers outside NATO bases, as well as U.S. soldiers urinating in public or cursing at their Afghan counterparts.
Another likely cause of the increase in the number of green-on-blue incidents is straightforward: In the past two years the size of the Afghan army and police force has almost doubled from around 200,000 to around 350,000.
This may also have contributed to a recent spike in the number of Afghan security forces turning their guns on their own Afghan colleagues. According to the NATO military official who spoke with CNN, there were 39 such "green-on-green" incidents last year and already 31 this year.
To combat the green-on-blue problem, U.S. and Afghan officials have implemented tighter vetting for Afghan army and police recruits, and now designate one U.S. soldier -- known as a "guardian angel" -- in those U.S Army units working with Afghan security forces whose job is solely to guard against attacks while American forces eat, sleep or exercise, the Associated Press reported.
A senior NATO military official tells CNN that the coalition has also increased the number of counterintelligence officers in the field to ferret out Taliban double agents.
But once all NATO combat troops have left Afghanistan at the end of 2014 any advisors who will remain will rely entirely on Afghan forces for their security, leaving them acutely vulnerable to green-on-blue attacks.
Follow @CNNOpinion on Twitter
Join us at Facebook/CNNOpinion