Top execs in Silicon Valley, Hollywood actors, and Washington politicians are coming to the defense of Muslims affected by a temporary travel ban into the United States that White House implemented on Friday.

Google and Facebook’s chief executives criticized President Trump’s immigration order, while former secretary of State Madeleine Albright, actress Mayim Bialik, and feminist Gloria Steinem all said they would register as Muslims if such a registry is created. This opposition to the executive order comes as Muslim advocacy groups prepare to challenge the order’s constitutionality in court.

Mr. Trump has long vowed to ban or limit Muslim immigration into the country in order to protect Americans from terrorist attacks carried out by Islamic extremists. Now that his administration has lived up to such campaign pledges, those resisting it argue it is un-American, both constitutionally and morally.

“We need to keep this country safe, but we should do that by focusing on people who actually pose a threat,” wrote Facebook Chief Executive Mark Zuckerberg in a post on his personal page on Friday.

“We are a nation of immigrants,” continued Mr. Zuckerberg, mentioning his German, Austrian, and Polish ancestry. “And we all benefit when the best and brightest from around the world can live, work and contribute here.”

The executive order the president signed on Friday temporarily bans both people from at least seven Muslim-majority nations and suspends the broader refugee program. For at least 90 days, travelers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen are barred from entering the US. The order also indefinitely bans Syrian refugees from the US.

Trump said the order gives his administration time to develop stricter screening process for refugees, immigrants, and visitors.

“I’m establishing new vetting measures to keep radical Islamic terrorists out of the United States of America. Don’t want them here,” Trump said on Friday at the Pentagon. “We only want to admit those into our country who will support our country and love deeply our people.”

The order took effect immediately, with travelers bound for the US already affected. The Department of Homeland Security issued a directive on Friday afternoon instructing the Customs and Border Control to enforce the order, according to the New York Daily News. Late Friday, some green card and visa holders were already being blocked from boarding US-bound flights, according to the newspaper.

However, Trump indicated on Friday he will prioritize bringing Syrian Christians into the US. The president said in an interview with the Christian Broadcasting Network that Christians seeking refugee status would receive priority. Trump indicated the US has unfairly treated Syrian Christians seeking religious asylum.

The order could affect tens of thousands of refugees and travelers. In fiscal year 2016, the US admitted a record total of 38,901 Muslim refugees from around the world compared with 37,521 Christians, according to the Pew Research Center. That same year, the US admitted 12,587 Syrian refugees, 99 percent of whom were Muslims and 1 percent of whom were Christian. Syria’s population is 87 percent Muslim and 10 percent Christian, according to the CIA World Book.

Some Republicans praised the executive order because they said the self-declared Islamic State has threatened to exploit the US immigration system.

"I am pleased that President Trump is using the tools granted to him by Congress and the power granted by the Constitution to help keep America safe and ensure we know who is entering the United States," said Virginia Rep. Bob Goodlatte, chairman of the House Judiciary Committee.

But Google chief executive Sundar Pichai criticized the travel ban in an email to staff on Friday, saying it affects at least 187 of the company’s employees.

“We’re upset about the impact of this order and any proposals that could impose restrictions on Googlers and their families, or that could create barriers to bringing great talent to the US,” said Mr. Pichai in the email, according to a copy provided to The Wall Street Journal. “It’s painful to see the personal cost of this executive order on our colleagues.”

Google also instructed employees traveling overseas for business or vacation, who may be impacted by the president's order, to return the US as quickly as possible. The company asked these employees to reach out to Google’s security, travel, and immigration teams for assistance, a person familiar with the situation told Bloomberg.

Also expected are legal challenges to the constitutionality of the order. The Council on American-Islamic Relations (CAIR) said it would announce a court challenge on Monday. CAIR said the order targets Muslims because of their faith, a violation of the constitutional right to freedom of religion.

But the travel ban from the seven Muslim-majority countries does not identify the ban is based on religion, according to USA Today. Of the seven nations on the list, the State Department lists Iran, Sudan, and Syria as state sponsors of terrorism. Iraq, Libya, Somalia, and Yemen are designated “terrorist safe havens.”

This report contains material from Reuters.