Donald Trump’s travel ban targeting citizens from mostly Muslim countries is likely to be upheld by the US Supreme Court after conservative judges signalled support for the president’s right to enact one of his most contentious policies.

While the country’s highest court is not due to make known its decision known until June, comments from members of the court suggested they were not prepared to second guess the president on the issue of national security. Dozens of protesters gathered outside the court carrying banners opposing the measure.

It was reported that both Chief Justice John Roberts and Justice Anthony Kennedy, who sit on the conservative majority nine-member court, indicated they did not want to question Mr Trump’s justification for introducing the ban by an executive order.

The ban – which applies to travellers from five Muslim majority countries: Iran, Libya, Somalia, Syria and Yemen – also affects citizens from North Korea, along with some Venezuelan government officials and their families.

It is the first piece of Mr Trump’s policy to come before the nation’s highest court, and one of the key elements of his presidential campaign. While the move triggered chaos and anxiety in airports around the world, and led to widespread protests, the president has defended the measure as an essential part of keeping the country safe – especially from groups such as Isis.

The president has continued with his rhetoric, even as critics have pointed out that most incidents of terror committed in the US are carried out by people who were born here, and in a majority of cases involve white people.

Donald Trump blast "judicial overreach" as Hawaii judge blocks travel ban

The court was hearing a challenge from several parties, including the state of Hawaii. They have argued the policy was motivated by Mr Trump’s enmity towards Muslims and that it violated federal immigration law and the US constitution’s prohibition on the government favouring one religion over another.

It was reported at Wednesday morning’s hearing that liberal judges (known as justices) indicated sympathy towards Hawaii’s arguments. However, conservative Justice Samuel Alito said the text of Mr Trump’s proclamation announcing the ban “does not look at all like a Muslim ban”.

Fellow conservative John Roberts questioned whether the president could be restricted from taking action on foreign policy emergencies, such as the civil war in Syria, if he is prevented from targeting specific countries.

Mr Kennedy pushed back on the notion pressed by the challengers that the ban was permanent, noting that the policy includes a requirement for ongoing reports that could potentially lead to the removal of a targeted country.

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

In an exchange with Hawaii’s lawyer, Neal Katyal, Mr Kennedy indicated it was not practical for a president to predict that six months after the ban was announced there will be a “safe world”.

Mr Trump’s own conservative appointee to the court, Neil Gorsuch, suggested the lawsuits challenging the ban should not have been considered by courts in the first place.

On 4 December the Supreme Court signalled it may lean towards backing Donald Trump when it granted, on a 7-2 vote, his administration’s request to let the ban go into full effect while legal challenges played out.

US Attorney General Jeff Sessions issued a statement that cited the president’s “broad discretion and authority to protect the United States from all foreign and domestic threats”.

About 150 people demonstrated against the travel ban outside the courthouse. Seema Sked, 39, stood before the court’s plaza with a homemade sign that read: “Proud American Muslim.”

“The Muslim ban offends freedom of religion, which is a protected right,” said Ms Sked, who immigrated with her parents from Pakistan and now lives in Virginia. “It hurts me because it is singling out and demeaning Muslims because of their faith.”