Syria is currently the world’s greatest humanitarian catastrophe and most dangerous geopolitical hotspot. The Syrian people are caught in a bloodbath, with more than 400,000 dead and ten million displaced.

Violent jihadist groups backed by outside patrons mercilessly ravage the country and prey on the population. All parties to the conflict – President Bashar al-Assad’s regime, the anti-Assad forces supported by the United States and its allies, and the Islamic State – have committed, and continue to commit, serious war crimes.

It is time for a solution. But such a solution must be based on a transparent and realistic account of what caused the war in the first place.

The chronology is as follows. In February 2011, peaceful protests were staged in Syria’s major cities, amid the region-wide phenomenon dubbed the “Arab Spring.” The Assad regime reacted with a shifting mix of violent repression (shooting at demonstrators) and offers of reform. Soon, the violence escalated. Assad’s opponents accused the regime of using force against civilians without restraint, while the government pointed to the deaths of soldiers and policeman as evidence of violent jihadists among the protestors.

It seems likely that as early as March or April 2011, Sunni anti-regime fighters and arms started to enter Syria from neighboring countries. Many eyewitness accounts tell of foreign jihadists engaging in violent attacks on policemen. (Such accounts are, however, hard to confirm, especially after almost five years.)

The US and its regional allies tried to nudge Assad from power in the spring of 2011, thinking that he would fall quickly like Egypt’s Hosni Mubarak and Tunisia’s Zine El Abidine Ben Ali. Many observers assert that Qatar funded an increase in anti-regime activity within Syria and used the Doha-based broadcaster Al Jazeera to boost anti-Assad sentiment worldwide, though such claims are hard to pin down definitively.

The US imposed a tightening noose of trade and financial sanctions on the regime. The Brookings Institution, a bellwether of US official policy, called for Assad’s ouster, and anti-Assad propaganda in the US media soared. (Until then, Assad was considered in the US media to be a relatively benign, albeit authoritarian, ruler, and then-Secretary of State Hillary Clinton noted as late as March 2011 that many in the US Congress regarded Assad as a reformer.)

The launch of the war can be dated to August 18, 2011, when President Barack Obama and Clinton declared that “Assad must go.” Up to that point, the violence was still containable. Total deaths, including both civilians and combatants, ran perhaps to around 2,900 (according to one tally by regime opponents).

After August, the death rate soared. It is sometimes claimed that the US did not act vigorously at this point. Obama’s political foes generally attack him for having taken too little action, not too much. But the US did in fact act to topple Assad, albeit mostly covertly and through allies, especially Saudi Arabia and Turkey (though neither country needed much prodding to intervene). The CIA and Saudi Arabia covertly coordinated their actions.

Of course, the chronology of the war does not explain it. For that, we need to examine the motivations of the key actors. First and foremost, the war in Syria is a proxy war, involving mainly the United States, Russia, Saudi Arabia, Turkey, and Iran. The US and its allies, Saudi Arabia and Turkey, started the war in 2011 in order to overthrow Assad’s regime. The US alliance was met with escalating counterforce by Russia and Iran, whose Lebanese proxy army Hezbollah is fighting alongside Assad’s government.

The US interest in overthrowing Assad’s regime was precisely its reliance on Iranian and Russian backing. Removing Assad, US security officials believed, would weaken Iran, undermine Hezbollah, and roll back Russia’s geopolitical reach.

America’s allies, including Turkey, Saudi Arabia, and Qatar, were interested in replacing Assad’s Alawite regime in Syria with a Sunni-led regime (Alawites are a branch of Shia Islam). This, they believed, would also weaken their regional competitor, Iran, and curtail Shia influence in the Middle East more generally.

In believing that Assad would be easily overthrown, the US – not for the first time – was relying on its own propaganda. The regime faced deep opposition, but also had considerable internal support. More important, the regime had powerful allies, notably Iran and Russia. It was naive to believe that neither would respond.

The public should appreciate the dirty nature of the CIA-led fight. The US and its allies flooded Syria with Sunni jihadists, just as the US had flooded Afghanistan in the 1980s with Sunni jihadists (the Mujahideen) that later became Al Qaeda. Saudi Arabia, Turkey, Qatar, and the US have regularly backed some of the most violent jihadist groups in a cynical miscalculation that these proxies would do their dirty work and then somehow be pushed aside.

According to the US and European mainstream media, Russia’s military intervention in Syria is treacherous and expansionist. The truth is different. The US is not allowed under the UN Charter to organize an alliance, fund mercenaries, and smuggle heavy weapons to overthrow another country’s government. Russia in this case is reacting, not acting. It is responding to US provocations against its ally.

Ending the war requires adherence to six principles. First, the US should cease both overt and covert operations to overthrow Syria’s government. Second, the UN Security Council should implement the ceasefire now under negotiation, calling on all countries, including the US, Russia, Saudi Arabia, Turkey, Qatar, and Iran, to stop arming and funding military forces within Syria.

Third, all paramilitary activities should cease, including those of so-called “moderates” backed by the US. Fourth, the US and Russia – and, indeed, the UN Security Council – should hold Syria’s government strictly responsible to desist from punitive actions against regime opponents. Fifth, the political transition should take place gradually and with confidence building on all sides, rather than through an arbitrary, destabilizing rush to “free elections.”

Finally, the Gulf States, Turkey, and Iran should be pressed to negotiate face to face on a regional framework that can ensure lasting peace. Arabs, Turks, and Iranians have all lived with each other for millennia. They, not the outside powers, should lead the way to a stable order in the region.