On Sunday, US President Donald Trump announced that the leader of the Islamic State in Iraq and the Levant (ISIL or ISIS), Abu Bakr al-Baghdadi, has been killed in a clandestine operation executed by US special forces in northwest Syria.The president thanked the governments of Russia, Turkey, Syria, and Iraq, as well as the Syrian Kurds, for lending support to the US authorities.The killing of al-Baghdadi, which came just two weeks after Trump ordered the US military to withdraw its forces from Syria could, therefore, be seen as the virtual end of the five-year US campaign against ISIL.Given the circumstances under which the US is leaving the Middle East, however, it is doubtful that this would mean the end of the armed group. In fact, Trump might be on his way to making the same mistake his predecessor, President Barack Obama, did in 2010.Trump's Obama policyAlthough Trump has been blaming Obama for all the ills and mishaps of US policies in the Middle East, he is, in fact, following in his footsteps. In 2009, Obama came to power on the promise of bringing US troops "back home" and making up for US military blunders in the Islamic world. He ordered US troops to pull out from Iraq by the end of 2011, claiming that al-Qaeda had been defeated and that the Iraqi government was fit to take control. The killing of Osama bin Laden in May 2011 helped Obama silence critics, especially at the Pentagon, who favoured a longer timetable for withdrawal.In 2013, al-Qaeda returned in a more brutal incarnation under the ISIL flag. In June 2014, it sent shockwaves across the region when it defeated the US-trained Iraqi army and captured Mosul, Iraq's second-largest city. A couple of days later, from the pulpit of Mosul's famous al-Nuri Mosque, Baghdadi declared the formation of a caliphate. The fall of Mosul, the defeat of the Iraqi army and the seizure of US-made equipment, including 2,300 Humvee armoured vehicles, was a major blow to the Obama administration, which found itself forced to dispatch US troops back to Iraq. A US-led international coalition to destroy ISIL was formed in September 2014.Five years later, President Trump declared that ISIL was "100 percent" defeated in Syria and that he is ready to bring US troops back. Just as Obama was, the current president is mainly concerned about fulfilling an election promise. To avoid creating a vacuum and silence critics, Trump accepted an offer made during a phone call on October 6, 2019, with Turkish President Recep Tayyip Erdogan to take over the battle against ISIL in Syria. The agreement with Turkey created more problems than it solved. The president was attacked by both Democrats and Republicans for "selling out" his Kurdish allies, who fought and died alongside US forces in the war against ISIS.The dealTo contain the storm, Trump sent his vice president to Ankara to negotiate an end to the Turkish operation. On October 17, the US and Turkey reached an agreement wherein Turkey, according to a White House briefing, agreed "to pause its offensive for 120 hours to allow the United States to facilitate the withdrawal of YPG forces from the Turkish-controlled safe zone". Article five of the agreement stated also that "Turkey and the US are committed to fighting ISIS/DAESH activities in northeast Syria". It is striking that al-Baghdadi was located and killed in northwest Syria near the Turkish borders 10 days after the Pence-Erdogan meeting in Ankara. It also came less than a week after the October 22 Erdogan-Putin summit in Sochi, wherein the two leaders agreed to push back Kurdish fighters from a "safe zone" along the Turkey-Syria border and emphasised "their determination to combat terrorism in all forms and manifestations". It is believed that Turkey and Russia may have played a key role in locating al-Baghdadi and in sharing intelligence with the US in order to help President Trump justify his decision to withdraw from Syria. For completely different reasons, both countries have a vested interest in making the US pull out of Syria. The end of ISIL?ISIL has lost all of the territories it once controlled in Syria and Iraq. Thousands of its die-hard fighters have been eliminated. The killing of al-Baghdadi must have also been a big blow.Yet, as in the past, these losses are unlikely to lead to the dissolution of the group because the underlining circumstances that gave rise to it are still intact.First, the Levant continues to be the battleground of regional rivalries, which destabilise the region and leave space for ISIL to stage a comeback. Right now Russia, Turkey and Iran, the key players in the Syrian conflict, all want the US to leave Syria but this consensus may not last after the US withdrawal. Iran already feels that it is being excluded from the understandings between Russia and Turkey on one hand, and the US and Turkey, on the other hand. In fact, Iran fears that the new arrangements in northern Syria, wherein Turkey and Russia try to fill in the vacuum resulting from the departure of US troops, will be at its expense. Ankara and Moscow may well be working towards preventing Tehran from establishing a "Shia crescent" across east Syria, which both the US and its closest ally Israel fear.To complicate things even further, the Pentagon decided to keep the Syrian oil fields under US control. Oil income, according to Secretary of Defence Mark Esper, will help fund Kurdish fighters, including the ones guarding prisons that hold captured ISIL fighters.A pro-Iran militia has already tried a week ago to capture one of the oil fields but was repelled by the US [source?]. The Syrian regime cannot survive in a post-conflict environment without recovering the oil fields too.Turkey will interpret the US move as a step towards creating a local economy for a possibly independent Kurdish entity in east Syria. Russia will not tolerate that either. This means renewed turmoil in northeast Syria is quite likely.Second, the maladies which plague Arab countries and which ISIL exploited to recruit and expand, are still very much present. Sectarian politics in the Middle East are still raging across the Middle East, marginalising various communities; social-economic problems, like poverty, corruption, injustice, repression, etc have still not been resolved.If these conditions are not dealt with, ISIL will no doubt make a comeback, just as al-Qaeda did in the past.To help defeat ISIS once and for all, an international effort is needed to establish security and end conflict. We need to establish a regional security system - something like OSCE in Europe - that would address the security concerns of all the states in the region, stop regional rivalries, proxy wars and interference in the internal affairs of other states.We also need to find a just solution to the conflict in Syria that would include both transitional justice and national reconciliation. We also need to establish more egalitarian and more representative political systems in the Arab world that could effectively tackle the most pressing socioeconomic ills.Only then can ISIS be defeated, not only as a group but more importantly as an idea, and only then can the US withdraw from the region without creating a security vacuum that allows for armed insurgencies to re-emerge and terrorise the local population.The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.