A network of informers, exploitation of popular dissent and the ability to strike at vulnerable moments helped hasten the end of France's combat mission in Afghanistan, according to a Taliban commander.
French troops rolled out of Kapisa province on Tuesday, ending one of the largest Nato combat missions in Afghanistan two years early, 10 months to the day since Afghan soldier Abdul Sabor shot dead five French colleagues.
The Taliban regularly take credit for "green-on-blue" attacks, but while Sabor's links to insurgents have never been confirmed, his actions left a profound impact on French troops on the ground and political will at home.
France entered Kapisa province and its neighbouring Surobi district in Afghanistan's northeast in 2007. Home to mafia, Taliban, and Hezb-e-Islami fighters with a toxic hatred of "invaders", they were in for a rough welcome.
"(The French) were not aware of the ground conditions. When there is a direct fight, we know exactly how to trap our enemies in the mountains, just like we did with the Soviets," says Bilal, a Taliban commander in Kapisa.
In August 2008, shortly after arriving in Surobi, 10 soldiers were killed in an ambush. At the time, it was the deadliest ground attack suffered by Nato in Afghanistan.
Seen as working for the Americans, whose invasion brought down the 1996-2001 Taliban regime, the French quickly lost any goodwill they once enjoyed among mujahedeen for charity work in the 1980s.
On top of the homemade bombs, ambushes and suicide attacks, the rebels claim to control a large network of informers, including Afghan soldiers working with Nato who support the Islamist uprising in secret.
"As soon as the French were moving in Kapisa or Surobi, we were aware of it," said Bilal, who claims to have up to 200 men at his disposal.
A Taliban exile speaking to AFP in Pakistan confirmed the same thing.
"We have informers inside bases everywhere," Bilal added. If they wanted a suicide bomber they called a specific number to inform central command.
The bomber would then arrive.
"Nobody knows where he comes from. It's our master weapon," said Bilal.
The rate of French fatalities quickly escalated. There were three in 2007, 11 in 2008 and 2009, 16 in 2010, 26 in 2011 and 10 so far in 2012, the majority in Kapisa.
The insurgents, whom the Afghan army estimates in Kapisa to number 250 in winter and 500 in summer, were on paper overwhelmed by the 2,500 French soldiers.
But in Paris, politicians worried about the bloodshed and started to discuss early retreat. Opponents thought it too risky to alienate their allies.
Others argued it made perfect financial sense against a backdrop of the euro crisis (the Afghan mission cost 500 million euros, or $642 million) in 2012.
After a suicide attack killed five soldiers on July 13, 2011, the French were told to stop going deep into the countryside. By autumn, Bilal says they "stayed in their bases and rarely went to towns".
Then Afghan police and soldiers stepped up attacks on Nato colleagues, although it remains unclear how many were directly dispatched by the Taliban.
"We sometimes identify soldiers who could potentially carry such attacks. We contact them through their family and convince them," said Bilal.
Shortly after Sabor shot five French colleagues out jogging on a military base, then-president Nicolas Sarkozy announced that French soldiers would withdraw in 2013, a year earlier than the deadline set by Nato.
In May, his successor Francois Hollande brought the date forward to 2012.
The French army says it had "no suspicion" of an insurgent infiltration.
But some facts remain troubling.
Such as the suicide bomber who killed four French soldiers on June 9, apparently lying in wait and blowing himself up as soon as the French soldiers got out of a vehicle only moments after arriving in a village.
The French are committed to development projects in Kapisa until 2016, and apparently the rebels do not rule out accepting them back.
"We're expecting France to contribute to peace and stability in the region, but with no strings attached. The end of combat doesn't meant we are going to cut all links," said Hezb-e-Islami spokesman Ghairat Baheer.