ON APRIL 2nd 2016, Iran and six world powers (America, Russia, China, Britain, France and Germany) agreed the outline of a deal to restrict Iran’s ability to develop a nuclear bomb for a decade, in return for a gradual easing of sanctions. If implemented, said President Barack Obama, it would resolve by diplomatic means one of the greatest threats to world security. But it is unclear how the accord will affect the deepening turmoil in the Middle East. Four Arab civil wars under way—in Iraq, Syria, Libya and Yemen—with Iran, America, Saudi Arabia supporting a complex mix of warring parties, as our interactive chart shows.

The conflicts reflect multiple divisions over religion, ideology, ethnicity and class. But the sectarian rift—in which Iran supports Shias and their allies, while Saudi Arabia backs at least some of the Sunnis—has become more acute. It is most apparent in Iraq, where the government is dominated by Shias and is allied to Iran. Most Sunni areas have been taken over by jihadists of the so-called Islamic State, who also control swathes of eastern Syria. In Syria President Bashar Assad’s Alawite minority sect, regarded as an offshoot of Shia Islam, dominates the government and is propped up by Iran and is Lebanese proxy, Hizbullah. The rebels are mostly Sunni and fragmented.In Yemen the link between the Houthis (followers of the Zaydi branch of Shia Islam) and Iran (devotees of the Twelver branch) is perhaps least clear. Yet this is where Saudi Arabia and other Sunni countries have decided to draw a red line against Iranian encroachment: the Saudis lead a ten-nation coalition involved in bombing the Houthis.

America, for its part, straddles the divide. In Iraq it operates alongside Iran to support the Baghdad government; in Syria it gives lukewarm support to some of the more moderate rebels; in Yemen it is providing intelligence and logistical help to the Saudi military operation. Where there is no Shia-Sunni divide, there are marked Sunni-Sunni splits. In Egypt the government of Abdel-Fattah al-Sisi is supported by Saudi Arabia and the United Arab Emirates against the Muslim Brotherhood, which is backed by Turkey and Qatar. The same two groupings support rival governments in Libya.