Outcomes of ISIS defeat in Syria and Iraq

In the aftermath of 9,11 attacks the US under president George W Bush declared war on terror. The then terror was Alqaeda and its offshoot Taliban.  Alqaeda owned the ideology, the mobilization and sleeper cells all around the world, while Taliban owned the land in Afghanistan and parts of the Afghani tribes and people. The US invaded Afghanistan, occupied it, overthrew the Taliban regime and replaced it by an elected government. Most observers believed then, that Alqaeda was totally defeated ,thus no more terror was then expected. Also observers considered that 9,11 was the paramount terrorist attack , which followed the attacks on world trade center in 1994,US embassies in Nairobi and Dar El Salam in 1998, and destroyer Cole off coast of Aden in 2000.
Terrorist attacks did not stop after 9,11, instead, Alqaeda carried out attacks in Indonesia, India, Pakistan, Saudi Arabia, Moroco, Spain,Turkey, United Kingdom and other countries.
One of the reasons that the US invaded Iraq was to wipe out the terrorist organizations, mainly AlQaeda. Yet now, and after 18 years, terror spilled over to Syria, Iraq, Libya, Yemen and Arab peninsula  Somalia and Egypt in different ways of attack.
In Syria and Iraq the terrorists became regular armies with command and control system ,logistic support and well defined ideology extracted from what so called political Islam and misinterpretation of the teachings of  Islam and inacurate sayings of prophet Mohamed  AlHadeeth. The first terrorist army was created in the beginning of 2012 ,  AlNusra, which was called officially in the press releases: AlQaeda organization in Sham – Alnusra Front. Later in 2013 ISIS(Alqaeda Islamic State in Iraq and Sham)   was created as a defector from the mother organization AlQaeda,led by the notorious Abo Baker AlBagdadi.
Many organizations appeared in Syria affiliated to AlQaeda belief and carried different names (Jaish AlSham ,the Islamic Turkistan party, Guards of religion….)
On the level of military operations, it is clear that the Army of ISIS was defeated in Iraq in the end of 2017 and it is about to end in East Syria soon. Yet The Army of AlQaeda is still deployed in Idleb province in North Syria, of them 15 thousands non Syrian fighters .Talks on the highest level are being held between Russia, Iran and Turkey to find an end either peacefully or by force with the cooperation and coordination with the Syrian government.  
By the end of the Armies of Alqaeda and ISIS  in Syria and Iraq ,there remains the sleeper cells not only in these two countries but in  most the Middle East ,North Africa, Arab Peninsula, Central Asia, India and Afghanistan- Pakistan  and other countries all over the world.
What form those sleeper cells would take?
1- In Afghanistan they will take the form of small groups ready to unite in an army and lunch attacks. They  should depend on some tribes and people supporting  them ideologically  and/or because of benefits from Opium drug trade. Taliban is part of Alqaeda in many ways, it showed remarkable resilience and over the past year dealt significant blows to the Afghan army and security forces. It combines terrorist insurgent attacks with conventional military operation by the army the soon it mobilize and prepare. As soon they assume power in Afghanistan or in parts of the country, they will continue to build momentum ,gain more strength, and then direct their terrorist activities towards the neighboring countries of Central Asia ,Iran and Pakistan.The recent agreement between the US and Taliban which concluded full withdrawal of US forces from Afghanistan within a year will also prove a boon for Taliban so that it will exploit any  security gap and weak areas left by US forces.This predicts a new role of Taliban to destabilize the region ,given the Afghani government was not a part of the agreement.
2- In Yemen, Alqaeda is showing more active in the Southern province mainly Hadarmout. Benefiting  from the involvement of Saudi Arabia and UAE in the war against the Houthis in North Yemen, Alqaeda  built safe havens and reorganized its ranks and files in the form of  small groups that grow larger to become units of a tribal army.  This army fits the geography of the desert and social fabric of the tribes.It will have a structure of command and control slightly different from that of a regular army. The US drones attacks did not undermine its activities in spite of killing some leaders.It is not clear yet the outcome of the war in Yemen ,but whatever it was Alqaeda will be an important player in the peninsula and likely constitute a threat to the stability and security of the region.
3-In West Africa the Boko Haram an offshoot of Alqaeda is expanding in Nigeria, Niger and Cameron and it has groups in North Nigeria acting on the borders of Cameron and Niger. Counter terrorism failed to end or weaken the terrorist organizations .In Niger the US lost a team of special operation forces and did not deploy so far in the area .No significant coordination has been reported in the region to brake Boko Haram.Not so far, the French troops deploy in Mali aiming at ousting Islamic militants from the North  and pushing them into the center. While the UN mission MINUSMA a 15 thousand strong  force, is deployed and should focus on duties such as ensuring  stability, stabilization and protection of civilians. So far these forces did not succeed in fighting terrorism and preventing them from expansion in that region.
In the above three regions AlQaeda is made up of  native people with little leaders from outside .It will likely form a kind of army upon any deterioration of the political and security situation in the mentioned countries. In addition to the army forms, sleeper cells and small groups are likely to remain dangerous.
4-In Syria, Iraq and the levant , sleeper cells will remain and would be activated to launch attacks on several  civilian ,governmental or military targets. West Iran may become a theater of terrorist operations of the cells. Alqaeda will take different names related to ethnic or confessional affiliation of the groups. The size of the group  depend on the support of the towns or tribes or clans that sympathize with their ideology.
5-As to ISIS , many of AlQaeda groups and individuals defected to ISIS ,yet they are not the majority at least in Afghanistan where the native Taliban still in the lead or in the Arab peninsula. ISIS will soon become sleeper cells of high danger. ISIS is based ideologically on the Khilafa,and the Khalifa AlBagdadi is the political ,military and spiritual leader.When they lose the condition of the Khilafa which is “the land of Islam” they will dismember as an army or large groups and become small teams of sleeper cells.
6- Sleeper cells of both Alqaeda and ISIS will dominate the world of terrorism in North Africa, Euorope ,Central Asia and other countries. The fate of the foreign fighters in Syria is an important indicator which determines the direction of terrorism in post ISIS and AlQaeda armies interval. Do they return back home- this is crucial to the Euoropean nationals – or leave to a third country  expected to be under attack of terror?
The best alternative is to bring them back home and refer them to the judiciary to undergo fair and transparent trial.The result of the trial should tell all the accomplices ,the funders,and all supporters in politics and media. The question is whether their government are ready to uncover these secrets or bury it in the sand?
7- Alqaeda and ISIS did not monopoly the world of terror , beyond  organized militancy the world has witnessed the growth of  DIY  terrorist attacks(Di It Yourself)over the past decade. These attacks were committed by individuals or small groups inspired by the radical ideology .They embrace the tactics of leaderless  resistance and stage attacks against perceived enemies.  Since producing some thing complicated as bombs and explosives ,DIY people opted for comparatively low-tech solutions such as stabbing, shooting or using  vehicles to mow down pedestrians. From  the couple in St Bernardino in California USA, to a truck driver in Nice, France and other attacks  in Germany and other countries, an individual uses his vehicle or knife or rifle as a weapon to commit terrorist attack alone without any plan.
ISIS relied largely on grassroots militants for operations in the west which seems isolated and not coordinated .Although ISIS  often issues press releases to claim responsibility on their DIY attacks.
Terrorist groups appeared to have motivated fewer attacks in 2018 because of its defeat in Syria and Iraq which have taken the sheen off its appeal. 
In order to stay at the scene , it is likely Alqaeda and the remains of ISIS resort to DIY operations in the West ,and this may involve some of those who would be released from prison after ending the legal detention in their countries. 
How to fight terrorist organizations in culture and funding?
Culture and Education.
As long as the current culture prevails in the grassroots of Moslem world, and the Clergy ,Sheikhs promote dangerous thought when they preach during prayers, and the curricula of education continues urge the believers against the infidels, terrorism will continue in many faces. 
Taliban, which means the students, was founded by graduates of religious schools in Pakistan and Afghanistan .Same schools are promoting the same culture and teachings in many Islamic countries. In order to fight this thought  ,there should be a counter promotion to the real teaching of religion based on the true interpretation of religion.A decision should be taken by the principal Islamic centers in  AlAzhar Egypt,Saudi Arabia Mecca,Iraq Alnajaf and other inor centers in Indonisia, Pakistan and other countries. The main issue is the Fatwa which means a religious decision taken by a  Sheikh involve many aspects of life including a permission to kill certain confessions or certain people from the same confession. Fatwa is usually more powerful   than a sentence adopted by a judicially court. Some Fatwas allow a man to implement the order no matter what was the  dangers even if it result in death of that man. All suicide bombers commit their attacks based on a Fatwa.
The Islamic centers are before a decisive decision to determine those who, and how and when they issue a Fatwa and the subjects discussed. The  should restrict such Fatwas on the Judiciary and fair trials.   
 It is impossible for Alqaeda ,and ISIS and other affiliated groups to survive and act without funding.When it comes to Armies as the case in Syria, Iraq , Afghanistan and Yemen ,then for sure they need  billions of dollars funding .Where did this money come? The story of international media that ISIS funds itself from the revenues of oil and Taliban from drug business is not convincing. If they sell oil , or drugs who do  purchase? and how money is transferred? Yet any way this money is not enough to cover salaries  ,living ,food, vehicles ,fuel ,arms and ammunition, and medical services .So there should be accomplices.
In funding , transferring and handing cash money ,the international community did  little or nothing to stop the flow of money. The US, for example  freezed assets of countries and individuals labled as terrorists but it was never reported that the banking system freezed assets to Alqaeda or ISIS. The money is still being transferred after rumors of moving ISIS to West Africa.  
There should be transparency and sincerity in stopping the flow of funds to Alqaeda and ISIS.
Yet recently a dispute erupted between the US and the EU over watchlists of countries .The EU commission proposed an addition  to the EU blacklist for countries and jurisdictions that possess significant gaps in their domestic AML/ CFT (Money laundry and funding terrorism) legal frameworks,  a few are sure to rankle the US including Saudi Arabia and four US jurisdictions-Guam ,American Samoa, Virgin Islands and Puerto Rico .This shows a deep gap between the US and the EU in dealing with countering funding of terrorism .Thus the international community should seek a new mechanism to stop funding terrorism.
Pending the end of conventional war on terror in Syria and Iraq, much work has to be done in terms of observing the preparations of AlQaeda affiliated groups in Arab Peninsula, Afghanistan and West Africa with a special attention to funding terrorist organizations and closed review of the curricula in the religious schools.