Three years ago, it was hard to find anything significant about Syria in books about al-Qaida. Yet today, Syria is widely – and correctly – seen as the cradle of a resurgent al-Qaida: a magnet for jihadist recruits, which offers the networks, skills and motivation needed to produce a new generation of terrorists. How did this happen? And why did it happen so quickly?

For Bashar al-Assad, the blame lies with outsiders – especially Turkey and the Gulf monarchies – who have used their money and influence to sponsor the uprising, arm the rebels and supply foreign recruits. This is certainly the case, but it’s only part of the story.

In the years that preceded the uprising, Assad and his intelligence services took the view that jihad could be nurtured and manipulated to serve the Syrian government’s aims. In particular, it was after America’s invasion of Iraq in 2003 that foreign jihadists were allowed to enter the country, setting up the very structures and supply lines that are now being used to fight the government.

Though there still isn’t any solid evidence that the jihadists as a whole are controlled by the regime, there can be little doubt that many of the older and more senior figures in groups like ISIS will have records with Syrian intelligence, and that some are likely to be collaborating with it. Nor is there any question that the Syrian government, which is fighting large numbers of secular defectors from its own forces, has an interest in portraying the opposition as crazy fanatics, or that some of its actions – such as releasing Islamists from the notorious Sednaya prison, or sparing ISIS-controlled areas from attack – have been designed to strengthen the jihadists vis-à-vis their rivals.

No one doubts that jihadist groups in Syria draw on external support and international networks, including foreign fighters from across the Middle East and even Europe. But the reason they were able to mobilise them – and mobilise them quickly – is that Assad’s government had helped to set them up.