Several CEO's from Silicon Valley have spoken against Donald Trump's executive order that halts U.S. entry for refugees. (Jhaan Elker,Monica Akhtar/The Washington Post)

The country’s leading technology companies are recalling overseas employees and sharply criticizing President Trump after he signed an executive order Friday barring for 90 days immigrants and visitors from seven Muslim countries from entering the United States.

The companies warned the action — which affects foreign-born immigrants with legal permanent residence status in the United States and also includes suspending the acceptance of refu­gees for 120 days — could impair the ability of America’s top companies to compete.

Google chief executive Sundar Pichai late on Friday ordered scores of staffers traveling overseas to return to the United States immediately. Pichai sent out a company-wide memo that was highly critical of Trump's action, saying it could prevent at least 187 foreign-born Google employees from entering the United States.

“It's painful to see the personal cost of this executive order on our colleagues," wrote Pichai. "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."

Thousands of tech workers living in Silicon Valley or abroad could potentially be impacted by Trump's executive order, according to Zahra Billoo, executive director of the San Francisco Bay Area office of Council on American-Islamic Relations.

About 250,000 Muslims are estimated to live in the Bay Area, many of whom are Arab or South Asian immigrants working at companies such as Google, Facebook, Twitter and Microsoft. Green card holders are at risk as well.

“This is just where it starts. What happens when they add Pakistan? Or a Gulf country? Indonesia and Malaysia?” said Billoo, a civil rights attorney. “By targeting immigrants in this way, Trump’s executive orders not only directly impacts certain workers, their families and these companies, they also impact co-workers because people from other Muslim-majority countries could be next.”

Twitter chief executive Jack Dorsey said in a tweet that the economic impact of the ban is "real and upsetting."

The policy won't just affect tech employees; it could also harm thousands of part-time drivers for ride-hailing services relied upon by many Americans, Uber chief executive Travis Kalanick said in a company-wide email. Kalanick added that he will be sure to raise the issue on Friday when he and a slew of other business advisers are expected to meet with Trump.

"This ban will impact many innocent people," wrote Kalanick, who in December accepted a position on Trump's economic advisory team.

In addition to blocking travelers from Iraq, Iran, Somalia, Sudan, Syria, Libya and Yemen, the restrictions on foreign entry will also apply to those who hold dual nationality. That would mean a person born in one of those seven countries but holding a passport from a country such as Britain, could also be denied entry into the United States.

The number of companies speaking out against the ban includes nearly half of the firms who met with Trump last month in New York, and who agreed to meet with the White House every quarter to discuss technology policy with him.

Microsoft general counsel Brad Smith, in a letter to staff Saturday, said that at least 76 employees will be affected by Trump's policy. The company said it has already contacted those individuals with offers of legal assistance and has urged other employees who may be subject to the ban to contact the company as soon as possible.

"As an immigrant and as a CEO, I’ve both experienced and seen the positive impact that immigration has on our company, for the country, and for the world," wrote Satya Nadella, Microsoft's chief executive, in a LinkedIn post. "We will continue to advocate on this important topic."

Facebook chief executive Mark Zuckerberg on Friday wrote in a public message that both he and his wife, Priscilla Chan, are indebted to the United States' policy of welcomeness and inclusion.

"We should also keep our doors open to refugees and those who need help. That's who we are," wrote Zuckerberg. "Had we turned away refugees a few decades ago, Priscilla's family wouldn't be here today."

Similar sentiments were expressed across the tech industry. Apple chief executive Tim Cook, who was in Washington to meet with Republican officials, tweeted a historic quote from President Abraham Lincoln highlighting "malice toward none" and "charity for all" during a visit to Ford's Theatre.

Cook later said in a company-wide email that without immigration, Apple would not exist; the co-founder of Apple, Steve Jobs, was the son of a Syrian immigrant.

"I've heard from many of you who are deeply concerned about the executive order issued yesterday restricting immigration from seven Muslim-majority countries," Cook wrote. "I share your concerns. It is not a policy we support."

Tesla chief executive Elon Musk said the policy failed to adequately address Trump's priorities.

"Many people negatively affected by this policy are strong supporters of the US," he tweeted. "They've done right,not wrong & don't deserve to be rejected."

Netflix chief executive Reed Hastings used even stronger language.

"Trump's actions are hurting Netflix employees around the world, and are so un-American it pains us all," he wrote. "Worse, these actions will make America less safe (through hatred and loss of allies) rather than more safe.."

Meanwhile, a major trade group representing firms such as Amazon, Netflix, Microsoft and LinkedIn said Saturday that Trump's decision had "troubling consequences" for Silicon Valley companies who depend on talent from overseas.

"The internet industry is deeply concerned with the implications of President Trump's executive order limiting immigration and movement into the United States," said Michael Beckerman, president of the Internet Association.

Trump's hostility toward Muslim refugees and immigrants raises tensions between the White House and Silicon Valley. Aside from PayPal co-founder Peter Thiel, who has been closely advising Trump, much of the tech industry had supported Hillary Clinton for president. In open letters and other public statements during the campaign, tech execs and workers objected to Trump's anti-Muslim views, and some signed onto a commitment not to help design Trump's proposed Muslim registry.

Trump's action against Middle Eastern travelers obligates tech companies to take a stand, Sam Altman, president of the influential startup accelerator Y Combinator, said in a blog post Saturday.

"The precedent of invalidating already-issued visas and green cards should be extremely troubling for immigrants of any country or for anyone who thinks their contributions to the US are important," Altman said in the post. "This is not just a Muslim ban. This is a breach of America's contract with all the immigrants in the nation."

For many in Silicon Valley, Trump's order crossed "a red line," according to Hunter Walk, a partner at the San Francisco-based venture capital firm Homebrew VC.

"For those of us who've already been vocal ... [it's] moving people from saying 'focus on midterm elections' to apply direct pressure to our industry's CEOs and our politicians to take a stand," said Walk. "And for those in our industry who thought they could just wait and see, they're taking our administration both literally and seriously this morning."