There is a great deal more going on in Syria than what was previously understood. The battlefield in Syria is a complex one with many moving parts. It seems that Assad at times is working with the Islamic State.

Islamic State forces pulled out of Palmyra in co-operation that has been going on for years, documents handed to Sky News show.

An investigation into leaked secret IS files suggests one piece of co-operation was over the ancient city of Palmyra. The files also show that the Islamic State militant group has been training foreign fighters to attack Western targets for much longer than security services had suspected.

The revelations underscore fears in the United States that a network of sleeper cells is spread across Europe, avoiding detection, and is planning further Paris- and Brussels-style assaults.

Islamic State defectors, meanwhile, have told Sky News that Palmyra was handed back to government forces by Islamic State as part of a series of cooperation agreements going back years.

The authenticity of the latest documents is impossible to verify, but all previous leaks of material funneled through this group have proved to be genuine.

The new documents are copies of handwritten orders sent from Islamic State’s headquarters.

One document requests safe passage for a driver through IS checkpoints “until he reaches the border with the Syrian regime to exchange oil for fertilizer”.

The defectors claim that this is a trade agreement between the two sides that has been going on for years.

Another letter contains instructions for a commander to “transfer all equipment and weapons to the agreed evacuation point. We have received intelligence that al Qasr and its surroundings will be bombed on November 24th, 2013”.

The defectors claim this was a withdrawal agreed between Syria and Islamic State.

The most interesting document was written shortly before the Syrian army recaptured the ancient city of Palmyra, after months of occupation by IS.

“Withdraw all heavy artillery and anti-aircraft machine guns from in and around Palmyra to Raqqa province,” the document says.

I asked one of the defectors if Islamic State was coordinating movement of its fighters and leaving areas they previously controlled, in direct coordination with the Syrian army and even the Russian airforce.

Terror experts asked to analyze the documents say they show this is arguably the most complicated war they have ever tried to make sense of.

“This is a war of perception and narrative and everyone is trying to manipulate events,” said Dr Afzal Ashraf from the think tank Royal United Services Institute.

“It may take 20 years before what we know exactly what is going on,” he added. “Almost certainly there will be some sort of communication going on between mortal enemies, and that is for short term tactical gains and losses.

“Certainly if there is economic trading going on, which we know there is, there would be communication.”

But defectors and civilians contacted by Sky News over many months all maintain there is not just communication but widespread collusion between the various warring factions, as well as the Syrian and Iraqi governments.

The United States has been particularly exasperated at air assaults by Syria’s ally Russia on groups the Americans have helped fund and train.

Any evidence there is collusion with America’s number one target, Islamic State, will test relations between the US and Russia even more.

Our analysis of all the Islamic State files has revealed the organization needs to maintain its caliphate in part to give it the room to train foreign jihadists to carry out attacks in Europe and further afield.

Al Qaeda needed first Sudan, and then Afghanistan, for exactly the same purpose. In doing so, it co-opted failed and ungoverned areas to use for its own training and development.

What the files reveal is that IS’s training program and exporting of terror has not just been going on for months, but for years – for much longer than Western security services were aware of.

Indeed, they suggest that a program of coordinated attacks on Western countries was one of the original building blocks of Islamic State.

Some of the documents, also from Islamic State’s headquarters, are orders for a terrorist cell traveling out of Syria and dated November 2014.

They request fighters divide into groups of four as part of an operation codenamed “Break the siege”.

The operation involved travelling over the Syrian border and deploying to “Infidel countries”.

Another set of papers, dated a month later, confirm the groups have reached their “Specialised Areas”.

One defector Sky News spoke to said Europe is the target of “Break the siege”.

The order is addressed to Abu Mohammed al Shamali. His name appears in our files nearly 400 times and he is often linked to jihadists from northern Europe. The United States has put a $5m bounty on his head.

Islamic State wants to maintain and expand its caliphate across historical Muslim lands while attacking and provoking a war with the West, and dividing societies.

It is a long term plan, the details of which we are only just learning.