In what has been dubbed a "ban on Muslims" from entering the US, President Trump has banned incomers from seven Muslim-majority countries, on what his administration says is a temporary basis amid security concerns. Moreover, his executive order indefinitely banned the admission of Syrian refugees.

The Trump team deny this is a Muslim ban, though Rudy Giuliani, former mayor of New York and one of the president's biggest supporters during his election campaign, said he had been asked by Trump how he could "do it legally".

Giuliani advised him to do it "on a factual basis" not a religious one, and so to target countries that pose a security concern for the US.

"In order to protect Americans, the United States must ensure that those admitted to this country do not bear hostile attitudes toward it and its founding principles," said Trump's executive order, which has met with legal challenges and mass protests.

The ban left green card holders whose nationalities are those mentioned in the ban stranded as they attempted to re-enter the US after travelling, despite having legal residence in the country. They were taken in for interviews by border officials and not automatically allowed to enter.

Trump's executive order is set to last 90 days before it is reviewed, but is already facing a number of legal challenges. One federal judge granted a stay on deportations of those who arrived with the appropriate visas. It may yet be struck down entirely as unconstitutional.

So which are the countries named in Trump's order? They're those listed as "countries of concern" by the Department for Homeland Security under the Obama administration, though there was never a ban on travel from these states, just stricter visa checks.

Iran

Lebanon's Hezbollah leader Sayyed Hassan Nasrallah
Lebanon's Hezbollah leader Sayyed Hassan Nasrallah (R) meets with Iran's Foreign Minister Mohammad Javad Zarif (L) in this handout picture released by Hezbollah Media office Hezbollah Media Office/Handout via REUTERS

An enemy of the US since the country's 1979 revolution, in which it switched from a secular dictatorship under the Shah (an American ally) to a hardline Islamic theocracy, relations between the two had softened under the Obama administration, culminating in the 2015 Iran nuclear deal. But Iran is a known state-sponsor of international terrorism through its proxies – the worst country in the world for this, according to a recent US government report – such as Hezbollah.

Iraq

Mosul Isis
A member of the Iraqi security forces stands next to a tunnel used by Islamic State militants in the Talkeef district of Mosul Khalid al Mousily/Reuters

The instability in Iraq following the US-led 2003 war, the collapse of Syria into civil war, and the rise of Islamic State has created a security nightmare in the country. It is now a hotbed of Islamist extremism and violent sectarian conflict, fed and fuelled by those from inside and out the Middle East who have interests in the region. Refugees hopeful of leaving Iraq and reaching the US – even those who helped coalition forces during the war, i.e. interpreters – may now have missed their chance.

Syria

Syria air strike
Syrian men and Civil Defence volunteers, also known as the White Helmets, search for survivors amid the rubble of a building following a reported air strike on the town of Taftanaz, in the northern province of Idlib Omar Haj Kadour/AFP

Since 2011, Syria's dictatorship has waged a bloody and indiscriminate war against moderate rebels, jihadists, and its own civilians after the country was caught up in the Arab Spring uprisings. Bashar al-Assad has clung on to power, supported heavily by the Russians. Amid the chaos, jihadists have seized control of parts of the country and neighbouring Iraq, most notably the Islamic State group. Refugees have poured out of the country and into the rest of the world, while the US and its allies bomb terrorist strongholds in Syria, avoiding direct conflict with Assad or Russia. A handful of terrorists have exploited the refugees' plight to gain entry to Europe.

Sudan

SPLA
Soldiers of the Sudan People Liberation Army celebrate while standing in trenches in Lelo, outside Malakal, South Sudan, on 16 October 2016 Albert Gonzalez Farran/AFP

The Muslim-majority North Sudan was created when the mostly Christian South Sudan won its independence in 2011 after years of civil war. Osama Bin Laden used Sudan for training terrorists in the 1990s, and al-Qaeda has an established presence in the country. Islamic State has also expressed intentions of setting up shop in impoverished Sudan, which borders Libya in northern Africa.

Libya

conflict photos 2016
21 November 2016: Forces loyal to Libya's Government of National Accord hold a position amid the rubble of destroyed buildings in Sirte's Al-Giza Al-Bahriya district during clashes with Islamic State jihadists to retake control of the coastal city Mahmud Turkia/AFP

Colonel Gaddafi's terror-sponsoring regime fell in the Arab Spring, and a fierce tribal war broke out across Libya that successive governments have failed to contain, even with the support of air strikes by the US and UK. Islamic State took advantage of the violent political chaos to fill the vacuum in some areas, seizing control of territory, though in December 2016 it lost its coastal stronghold of Sirte after months of fighting.

Yemen

Houthi fighters
Newly recruited Houthi fighters parade before heading to the frontline to fight against government forces, in Sanaa, Yemen Khaled Abdullah/Reuters

A vicious civil war is underway in Yemen, creating a serious humanitarian crisis. President Abdrabbuh Mansour Hadi, backed by a Saudi-led coalition, is fighting the Houthi rebels. Accusations of war crimes abound on all sides. Terrorists have over the years set up training camps in Yemen, and both al-Qaeda and Islamic State have a presence. The senior al-Qaeda terror-preacher Anwar al-Awlaki, a Yemeni-US national, was killed in a US air strike on Yemen in 2011.

Somalia

Mogadishu car bomb
Rescuers carry an unidentified injured man from the scene of an explosion in front of Dayah hotel in Somalia's capital Mogadishu Feisal Omar/Reuters

Somalia, which sits on the Horn of Africa across a small stretch of water from Yemen, is one of the poorest and most corrupt countries in the world regarded by many to be a failed state. The militant jihadist groups al-Shabaab and Islamic State operate in the country, which is the target of numerous terror attacks, often in its capital Mogadishu.