The US Supreme Court has Donald Trump’s travel ban which severely limits travellers from certain countries entering the US.

As it stands, travellers, immigrants, and visa holders from Iran, Libya, North Korea, Somalia, Syria, Venezuela, and Yemen are banned from coming into the US.

All through his campaign in 2016, Mr Trump had called for a “total and complete shutdown” any Muslims entering the US "until our country's representatives can figure out what is going on”.

What was the first travel ban?

On 27 January 2017 Mr Trump signed an executive order banning entry into the country for 90 days for travellers from seven majority-Muslim countries: Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen.

It also placed an indefinite hold on refugees fleeing the Syrian conflict and a four month-hold on refugees from anywhere else in the world.

Demonstrators crowd outside US Supreme court to protest travel ban

The ban he signed had also called for an end to the Visa Interview Waiver programme, which eliminated the need for an in-person interview to renew travel credentials for people from 38 countries, some US allies.

The first iteration of the travel ban - also known which critics called a "Muslim ban" - sparked massive public protests in nearly every airport around the whole country and mobilised legal and immigrants’ rights groups into action.

Was it challenged?

In the days following the initial ban, courts in New York and Massachusetts issued temporary blocks on the order. Stating that if a traveller had a legal right to enter the country with a visa then they could not be denied or removed from the US.

The backlash was felt by then-Acting Attorney General Sally Yates who was fired for refusing to defend the order publicly.

In February 2017, the Ninth Circuit Court of Appeals in San Francisco then ruled against reinstating the ban after both the administration and activist groups filed petitions.

But there was another ban issued?

In March 2017, a revised travel ban was issued by the Trump administration, authored by White House aide Stephen Miller.

Sally Yates shuts down Ted Cruz in debate over constitutional law surrounding the travel ban

After uproar from the US military and veteran community, Mr Trump removed Iraq from the travel ban list. Advocates said it was unfair to block translators and interpreters who assisted and fought alongside US troops during the Iraq War from coming to the US.

However, Iran, Libya, Somalia, Sudan, Syria and Yemen remained on the list for the 90-day ban and refugees were banned for 120 days.

What happened in Hawaii?

The revised ban was set to take effect on 16 March 2017, but just hours before that deadline, a federal judge in Hawaii placed a temporary, nationwide block on implementing the ban.

Mr Trump called it “unprecedented judicial overreach”. A federal judge in Maryland and the judge in Hawaii both cited Mr Trump’s anti-immigration remarks during his campaign as evidence to suggest it amounted to a “Muslim ban”.

The administration pushed back once again and an appeal was heard in the 4th Circuit Court of Appeals, which ultimately ruled that the revised ban "continues to exhibit a primarily religious anti-Muslim objective”.

The US Supreme Court intervenes

The case was appealed up to the highest court in the country in June 2017. It upheld part of the ban and stated that travellers had to cite a “bona fide” relationship with a “close” US relative and defined those family relationships as parent, spouse, child, adult son or daughter, son-in-law, daughter-in-law or sibling. Grandparents were not included.

Mr Trump continued his Twitter push to say the ban was a matter “safety” for Americans and called the revised ban a “watered-down, politically correct” version.

The third, current version is issued

Appearing to address the religious discrimination legal concerns, the Trump administration added North Korea and Venezuela to the list. It removed Chad after, once again, the military likely expressed concerns. The African nation has been a staunch ally of the US in counter-terrorism efforts on the continent.

People with work visas from certain countries were also excluded from the ban.

New York City bodegas strike to protest Trump's travel ban Show all 27 1 /27 New York City bodegas strike to protest Trump's travel ban New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People gather for evening prayer at a rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban NEW YORK, NY - FEBRUARY 02: Yemeni business owner Musa closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty

Unlike previous versions, this travel ban does not expire.

In December 2017, despite dissents from Justices Ruth Bader Ginsburg and Sonia Sotomayor, the travel ban was allowed to come into effect.

So, what happened today in the US Supreme Court?

In a narrow 5-4 ruling, the court ruled in favour of the government in the case of Trump vs. Hawaii, the pending lawsuit from last year.

The ruling was along party lines, with justices appointed by Democratic presidents like Ms Ginsburg, Ms Sotomayor, Elena Kagan, and Stephen Breyer all dissenting.

Foster and Miliband speak at rally opposing Trump's travel ban

However, Chief Justice John Roberts wrote in his majority opinion: "The Proclamation is squarely within the scope of Presidential authority”.

He also wrote that the issue at hand was not whether the president’s previous comments calling for a ban on Muslims were relevant to whether the order is Constitutional or not. He said the order is “neutral on its face” and the court “must consider not only the statements of a particular President, but also the authority of the Presidency itself”.

Mr Trump immediately responded, saying the ruling was “a moment of profound vindication following months of hysterical commentary from the media and Democratic politicians who refuse to do what it takes to secure our border and our country”.

Ms Sotomayor wrote in a dissent: "The majority here completely sets aside the President's charged statements about Muslims as irrelevant. That holding erodes the foundational principles of religious tolerance that the court elsewhere has so emphatically protected, and it tells members of minority religions in our country 'that they are outsiders, not full members of the political community'".

She also compared the ruling to one issued in 1944 - Korematsu vs. United States was the case which established the right of the US to place Japanese-Americans in internment camps during the Second World War.

What happens now?

The legal fight is not actually over. Mr Roberts instructed the 9th Circuit Court of Appeals to issue its ruling on the ban. However, by issuing this decision the fight to get the ban blocked once again just became all the more difficult.