Islamic State crisis: The rise of jihadists in Iraq and Syria
As Islamic State (IS) seeks to expand the territory under its control in Iraq and Syria, attacking the border town of Kobane, the BBC's Paul Wood charts the rise of jihadist groups in the region.
"This is Crusader-Arab treachery, a war on all Sunnis," read a placard at a recent protest in Syria against civilian casualties said to be the result of US air strikes.
If bombing is killing some civilians, it is no surprise. Islamic State is a relatively small, irregular force, dispersed among the population.
But more than that - in the conservative, rural Sunni Arab heartland, most of the IS fighters are local tribesmen. The jihadists are not some foreign blight. They grew out of the soil of Iraq and Syria.
At the start, the Arab Spring and the promise of democracy seemed to make al-Qaeda, or its variants, irrelevant. But two years into Syria's civil war, I remember bumping into a senior officer with the Free Syrian Army (FSA), one of those touted by Western diplomats as a secular moderate.
I learned later that he had just appeared on YouTube next to a notoriously bloodthirsty Chechen jihadist commander.
"We kiss the hand that holds the trigger against Assad," he had declared.
As the civil war ground on, the rebels began to change. Some I knew who had not seemed particularly religious started to pepper their conversation with quotes from the Koran.
The explanation was partly that fighters who risked their lives every day, and saw death all around them, had rediscovered and strengthened their faith.
They had also lost hope that serious Western help would ever come. Instead, they had turned to the jihadists, funded by rich patrons in the Gulf.
From the shadows
One of those jihadist groups was the al-Nusra Front, al-Qaeda's Syrian subsidiary, which is now being bombed along with Islamic State.
We encountered them back in January 2013, just as they were emerging from the shadows.
This feared and secretive group agreed to speak to us. I asked them whether the jihad would continue if a democratic Syria rejected their aim of establishing an Islamic state.
"That will never happen," said a commander. "Syria is an Islamic country and people love Islam. They're fed up of secular regimes. It's impossible that they would reject Sharia."
Well-funded, and well-organised, less inclined to the thievery and kidnapping practised by parts of the FSA, al-Nusra quickly became one of the strongest rebel groups. They began a bloody struggle over who would control Syria's revolution against the jihadists who now make up Islamic State.
Other rebel groups - mostly from the FSA - sided with al-Nusra in that struggle and - this time last year - joined them in issuing "Communique No 1". That also broke with Syria's Western-backed political opposition, the National Coalition.
War within a war
Communique No 1 was a clear statement that the rebels were fighting for Sharia, not democracy. It was an evisceration of Western policy - increasingly, Western governments would find it difficult to identify rebel groups they could back in Syria's uprising.
Meanwhile, there was a civil war within the civil war - a struggle between different groups of Islamists. Al-Nusra and the other rebel groups pushed Islamic State out of Aleppo and back to their headquarters of Raqqa.
IS - ever flexible - turned to Iraq. There, Sunni grievances against the Shia-led government, had presented them with an opening. They seized it in June of this year when they took control of Iraq's second largest city, Mosul.
I suspect that even IS was surprised by the speed and scale of the victory in Mosul.
The immense corruption in the Iraqi security forces was partly to blame. And Shia soldiers did not want to fight for predominantly Sunni cities like Mosul or Tikrit, while many Sunnis viewed the Shia-led government in Baghdad as murderously sectarian.
In Mosul, IS captured tonnes of weapons and ammunition, and hundreds of armoured vehicles and tanks. They also captured the propaganda initiative - young Sunnis flocked to the cause. In Syria, therefore, IS was able to go on the offensive once again.
The jihadists are closing in, advancing along the main road to Kobane; the Kurds know they must stop them there or lose the town.
The Kurds say that air strikes have not stopped IS from moving forces up to confront them. They are pleading for a more decisive Western intervention. Islamic State fighters filmed themselves on the road to Kobane happy and relaxed. They believe victory is within their grasp.
Still, in Kobane, the US has a Kurdish infantry that can take advantage of air strikes. It may simply take more intensive strikes to tip the balance.
Elsewhere in Syria, there are hundreds of Sunni Arab armed groups, many of them Islamist.
Al-Nusra is talking about uniting with its old rival, Islamic State, and could take other rebel groups with them.
For bombing to work in Syria, the US and other Western powers must find a reliable partner among the rebels groups. That is something they have struggled to do in three years of civil war.
It is another reason why - as the politicians have warned - the struggle against Islamic State will be a long war.