For the interactive version, visit Slate.com on your desktop or tablet.

AL-QAIDA

Egypt: ENEMY

Egypt’s military government has made cracking down on extremist groups in the Sinai Peninsula a priority, and the al-Qaida-inspired group Ansar Beyt al-Maqdis has emerged as the country’s most formidable terror threat.

Hamas: COMPLICATED

The two groups have been linked in the past and have a shared hostility toward Israel, but their ultimate goals are quite different. Hamas authorities in Gaza have at times clashed with even more radical al-Qaida-linked groups there.

Hezbollah: ENEMY

While nominally on the same side in the Israeli-Palestinian conflict, the Shiite Lebanese militia and the Sunni international terror network have found themselves on opposite sides of Syria’s brutal civil war. Al-Qaida-linked groups have carried out attacks against Hezbollah targets in Lebanon.

Iran: COMPLICATED

Despite their religious divide, Iran has allowed senior members of al-Qaida to operate from its territory in the past, particularly after the U.S. invasion of Afghanistan in 2001, but the civil war in Syria has seriously strained the relationship. Iran expelled Osama Bin Laden’s son-in-law and spokesman from its territory in 2013.

Iraq: ENEMY

Al-Qaida remains opposed to the U.S.-backed Shiite government in Iraq, though ISIS is now the primary threat to the Iraqi government.

ISIS: Al-Qaida central disavowed any connection with the group that used to be known as “al-Qaida in Iraq” earlier this year and has criticized both its tactics and unwillingness to work with other groups. ISIS leader Abu Bakr al-Baghdadi’s declaration of a “caliphate” last month was a major challenge to the authority of al-Qaida leader Ayman al-Zawahiri.

Israel: ENEMY

Al-Qaida and its affiliates remain committed to the destruction of the Jewish state.

Palestinian Authority: ENEMY

Al-Qaida leader Ayman al-Zawahiri has denounced Palestinian President Mahmoud Abbas as an appeaser who is selling out the Palestinian cause to appease the United States.

Saudi Arabia: ENEMY

Al-Qaida supports the overthrow of the House of Saud, and Saudi security forces have cracked down on al-Qaida cells within the country and supported efforts to fight al-Qaida in the Arabian Peninsula in neighboring Yemen. However, U.S. officials have often expressed frustration with the government’s inability to prevent wealthy Saudis from sending funding to the group.

Syria: ENEMY

Al-Qaida supports the fight against Bashar al-Assad’s regime through its local affiliate Jabhat al-Nusra.

Turkey: ENEMY

Al-Qaida has carried out a number of deadly attacks against Turkey over the years. But all the same, Turkey only recently stopped supporting the al-Qaida-linked Jabhat al-Nusra in Syria.

United States: ENEMY

The U.S. continues to attack al-Qaida and its affiliated groups in Libya, Somalia, Pakistan, and Yemen, though these efforts have shifted more toward affiliates like al-Qaida in the Arabian Peninsula rather than the central Pakistan-based group once led by Osama Bin Laden. The U.S. government believes al-Qaida is still plotting attacks against the United States and its international interests.

EGYPT

Hamas: ENEMY

In stark contrast to ousted President Mohamed Morsi of the Hamas-linked Muslim Brotherhood, the new Egyptian government has made life miserable for Hamas by arresting its members within Egypt and destroying the smuggling tunnels used to bring goods (as well as weapons) into Gaza.

Hezbollah:ENEMY

Cairo designated Hezbollah as a terrorist group in 2009. Ties warmed briefly under former President Mohamed Morsi but have soured since his ouster. Morsi is currently on trial, in part, for allegedly conspiring with the group.

Iran:COMPLICATED

Iran and Egypt have had a tense relationship since the 1979 revolution, but things improved a bit under former President Mohamed Morsi, who in 2012 became the first Egyptian leader since the revolution to visit the Islamic Republic. Iran denounced Morsi’s overthrow, but there have been some signs of a continuing thaw between the two.

Iraq: FRIENDLY

The two governments are relatively friendly. Iraq backed Egypt’s crackdown on supporters of the Muslim Brotherhood in 2013, and Egypt supports Iraq remaining a unified state.

ISIS: ENEMY

There have been some reports of ISIS members operating in Sinai, but whether or not that’s true, the group is certainly hostile to the Egyptian government.

Israel: FRIENDLY

Likely in deference to public opinion, Egyptian President Abdul Fattah al-Sisi has condemned Israel’s offensive in Gaza, but has crucially kept its border closed, preventing aid or reinforcements from reaching Hamas or the people of Gaza. Egypt and Israel are currently working on a major gas deal.

Palestinian Authority: COMPLICATED

The PA supported the ouster of Mohamed Morsi, who was seen as supportive of rival Hamas. The two governments have been negotiating terms for a Gaza ceasefire.

Saudi Arabia: FRIEND

Saudi Arabia supported the coup that ousted President Mohamed Morsi and has provided financial backing for the new government.

Syria: ENEMY

While former President Mohamed Morsi supported the uprising against Bashar al-Assad, Egypt's new rulers have been far less enthusiastic, opposing outside military intervention.

Turkey: ENEMY

Recep Tayyip Erdogan’s Islamist government, which knows a thing or two about military coups, strongly condemned the ouster of Mohamed Morsi. Turkey expelled Egypt’s ambassador in late 2013, and relations between the two regional powerhouses remain chilly.

United States: FRIENDLY

The U.S. suspended military aid to Egypt last fall after its crackdown on the Muslim Brotherhood but recently restored it, despite few apparent improvements in the human rights situation in the country.

HAMAS

Hezbollah: COMPLICATED

The two groups have long shared a common goal in the struggle against Israel—and both have backers in Iran and Syria—but their relationship has soured since Hamas made the decision to support the rebels fighting Bashar al-Assad.

Iran: COMPLICATED

Iran is one of Hamas’ traditional backers, but it cut its support to the group after they found themselves on opposite sides of the Syrian conflict. More recently, however, there have been indications that they’re patching things up.

Iraq: COMPLICATED

The Iraqi government has been critical of Israel, but doesn't have much of a relationship with Hamas.

ISIS: ENEMY

ISIS reportedly has a recruitment presence in Gaza, and Hamas authorities have attempted to clamp down on young Palestinians going to join the fight in Syria.

Israel: ENEMY

Not much nuance here. The two continue to exchange fire, though Israel’s current offensive seems likely to seriously degrade the group’s capabilities.

Palestinian authority: COMPLICATED

Hamas, which maintains control of Gaza, and Fatah, which controls the West Bank, are longtime rivals for political control in the Palestinian territories, but Hamas backed a unity government led by Fatah’s Mahmoud Abbas in June.

Saudi Arabia: COMPLICATED

The Saudis have traditionally been backers of Palestinian unity governments and have attempted to act as mediators in conflicts with Israel, but things were complicated earlier this year when Saudi Arabia designated Hamas’ parent organization, the Muslim Brotherhood, as a terrorist group.

Syria: ENEMY

In 2012, Hamas made the politically risky decision to cut its ties with Bashar al-Assad’s regime and back the rebels, moving its headquarters from Syria to Qatar.

Turkey: FRIEND

Prime Minister Recep Tayyip Erdogan has hosted Hamas leader Khaled Meshal three times, the only NATO country that has done so.

United States: ENEMY

The U.S. considers Hamas a terrorist organization, though much to Israel’s consternation, it said last month that it would continue to work with the Hamas-backed Palestinian unity government.

HEZBOLLAH

Iran: FRIEND

Tehran has been Hezbollah’s primary patron since its founding in the early 1980s.

Iraq: FRIEND

Though there’s not much direct collaboration between the two, Nouri al-Maliki’s Shiite government shares with Hezbollah a key ally in Iran and a key enemy in ISIS. Maliki raised eyebrows in Washington in 2006 by denouncing Israel as the aggressor in its anti-Hezbollah incursion into Lebanon.

ISIS: ENEMY

Hezbollah is staunchly opposed to the growing Sunni militant threat posed by ISIS. The departure of Iraqi Shiite militias to return home to fight has left the group a bit overexposed in Syria.

Israel: ENEMY

For now, the Israel-Hamas conflict is getting more attention, but Israel-Hezbollah violence seems likely to return eventually.

Palestinian Authority: COMPLICATED

Mahmoud Abbas has criticized the group in the past, but not very strongly.

Saudi Arabia: ENEMY

Riyadh blacklisted Hezbollah as a terrorist organization in March and called for it to pull out of Syria.

Syria: FRIEND

Hezbollah members have been fighting in Syria on behalf of Bashar al-Assad’s regime.

Turkey: COMPLICATED

The two are supporting opposite sides in Syria, and relations have been strained, but unlike a number of other governments, Turkey has not designated the group as a terrorist organization.

United States: ENEMY

The U.S. considers Hezbollah a terrorist organization and sanctions companies that do business with it.

IRAN

Iraq: FRIEND

Iran has been steadily increasing its influence in Shiite-dominated Baghdad for years and has dispatched advisers and drones to aid the government in its fight against ISIS.

ISIS: ENEMY

The rise of ISIS is a major threat to Iranian interests in both Iraq and Syria, and Tehran has been pouring resources into fighting the group in Iraq.

Israel: ENEMY

Whatever other shifts have been happening in the Middle East, the hostility between Iran and Israel has not dampened, nor has Israel’s skepticism about the prospects for an international nuclear deal between Iran and the West.

Palestinian Authority: COMPLICATED

Iran traditionally backed the more militant Hamas and Hezbollah, and contacts between the PA and Tehran are cordial but rare.

Saudi Arabia: ENEMY

The Sunni and Shiite powers are major rivals for regional influence, and many view the bloody struggle in Syria as something of a proxy battle between the two, though some recent dialogue may hold out the possibility of a rapprochement.

Syria: FRIEND

Along with Russia, Iran has been Bashar al-Assad’s most committed international backer, sending billions in aid to his beleaguered regime.

Turkey: COMPLICATED The two longtime rivals for regional influence are at odds over the conflicts in both Syria and Iraq, but have a The two longtime rivals for regional influence are at odds over the conflicts in both Syria and Iraq, but have a deepening economic relationship , and political ties have been warming.

The two longtime rivals for regional influence are at odds over the conflicts in both Syria and Iraq, but have a deepening economic relationship, and political ties have been warming.

United States: ENEMY

For now at least. The U.S. retains sanctions on Iran, and the two are still miles apart on a host of issues from Syria, to Israel, to human rights, but under new President Hassan Rouhani there’s been more progress toward a nuclear deal and the two are now tacitly cooperating in helping the Iraqi military fight ISIS.

IRAQ

ISIS: ENEMY

ISIS isn’t just the most serious security threat Iraq has faced in years, it poses a threat to the country’s existence within its current borders.

Israel: ENEMY

Much to the irritation of his backers in Washington, Prime Minister Nouri al-Maliki has remained steadfast in his unwillingness to deal with Israel. Israel, meanwhile, has emerged as one of the staunchest backers of an independent Kurdistan.

Palestinian Authority: FRIEND

Mahmoud Abbas has had a fairly friendly relationship with Iraq’s government.

Saudi Arabia: ENEMY

Prime Minister Nouri al-Maliki has accused Saudi Arabia and Qatar of backing ISIS to destroy his government. The Saudis, meanwhile, blame Maliki’s sectarian policies for the violence.

Syria: FRIEND

Prime Minister Nouri al-Maliki has offered both rhetorical and material support for Bashar al-Assad’s government

Turkey: ENEMY

The Turkish government has blamed Nouri al-Maliki’s misrule for the crisis in Iraq. Maliki’s government was also angered earlier this year by a gas deal signed between Turkey and the Kurdish Regional Government that was signed without Baghdad’s consent.

United States: FRIEND

The U.S. facilitated Nouri al-Maliki’s rise to power—and some say let him get away with increasingly authoritarian and sectarian tactics—and has now sent military advisers to help in the fight against ISIS. On the other hand, there are strong signals that the U.S. would prefer to deal with a different Iraqi prime minister.

ISIS

Israel: ENEMY

ISIS’s main efforts are focused elsewhere at the moment, but ISIS’s “caliphate” is certainly hostile to the Jewish state and Israel has been quietly stepping up its support to more moderate Syrian rebel groups. There are some reports that militant groups in Gaza have pledged allegiance to ISIS.

Palestinian Authority: ENEMY

ISIS’s vision for the Middle East doesn’t leave much room for compromise with Israel.

Saudi Arabia: ENEMY

Saudi Arabia has denied claims that it supported the rise of ISIS and has recently begun to crack down on the group, but in the past may not have always tried its hardest to prevent private donors from supporting it and other extremist groups in Syria.

Syria: ENEMY

Though it’s not quite as clear-cut as you might imagine. ISIS is formally committed to his overthrow, but Bashar al-Assad’s military largely avoided attacking ISIS for months as it gained strength in eastern Syria, likely in order to further divide the rebel movement. But Syrian planes have recently begun attacking ISIS within Iraq.

Turkey: ENEMY

ISIS has abducted dozens of Turkish citizens in Iraq, many of whom remain in captivity.

United States: ENEMY

The U.S. has stepped up its support to both the Iraqi government and other Syrian rebel groups in order to contain ISIS.

ISRAEL

Palestinian Authority: ENEMY

A recent bid by John Kerry to restart talks between the two failed, and a two-state solution seems as far off as ever.

Saudi Arabia: COMPLICATED

The relationship between the two has always been more pragmatic than friendly, but they’re both suspicious of Iran’s nuclear intentions and frustrated with what they see as mixed U.S. signals on Syria.

Syria: ENEMY

Relations between the two countries have always been hostile and periodically violent. Israel has carried out airstrikes against Syrian military targets on several recent occasions.

Turkey: COMPLICATED

Prime Minister Recep Tayyip Erdogan has been one of Israel’s most vociferous international critics, particularly since the killing of nine Turkish activists in the 2010 Gaza flotilla raid. But despite the dismal political relationship, economic ties between the two have continued to grow.

United States: FRIENDS

The relationship between President Obama and Prime Minister Benjamin Netanyahu isn’t exactly cordial, and Israel has been alarmed at the slightly warming ties between Washington and Tehran, but the U.S. remains Israel’s primary military and political backer.

PALESTINIAN AUTHORITY

Syria: COMPLICATED

Turkey: FRIEND

Ankara has been increasing its economic aid to the Palestinian government.

Saudi Arabia: FRIEND

Saudi Arabia has given significant financial assistance to the Palestinian Authority.

United States: COMPLICATED

The U.S. is a major economic backer of the Palestinian Authority and has continued to support talks with Israel, but Palestinians have been frustrated with U.S. reluctance to put pressure on Israel and the U.S. has attempted to block recent Palestinian statehood bids at the United Nations.

SYRIA

Turkey: ENEMY

Along with Saudi Arabia and the Gulf states, Turkey has been one of the main backers of the anti-Assad rebels as well as a major recipient of refugees from the conflict. According to a leaked recording, Prime Minister Recep Tayyip Erdogan and his advisers have even considered direct military action.

Saudi Arabia: COMPLICATED

Saudi Arabia, along with Turkey and Qatar, is one of the major regional backers of the rebels fighting to overthrow Bashar al-Assad.

United States: ENEMY

While the Obama administration has been reluctant about being drawn into the conflict, it has imposed sanctions on Syria, provided covert aid to some rebel groups, and at one point threatened airstrikes over Assad’s use of chemical weapons. This makes it somewhat awkward that the two are now fighting a common enemy in ISIS.

TURKEY

United States: COMPLICATED

President Obama and Recep Tayyip Erdogan developed a personal rapport during the Arab Spring and were reportedly in frequent communication, but the relationship has frayed recently over U.S. criticism of Erdogan’s increasingly authoritarian rule and Turkish frustrations over America’s hesitant response to Syria.

Saudi Arabia: COMPLICATED

The two have deepening economic ties and a common cause in Syria, but in the long run they are rivals for regional influence and Saudi Arabia was far less excited than Turkey about the Arab Spring revolutions.

SAUDI ARABIA

United States: FRIENDS