NEW YORK (AP) — Google, Apple and other tech giants expressed dismay over an executive order on immigration from President Donald Trump that bars nationals of seven Muslim-majority countries from entering the U.S.

The U.S tech industry relies on foreign engineers and other technical experts for a sizeable percentage of its workforce. The order bars entry to the U.S. for anyone from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen for 90 days.

The move, ostensibly intended to prevent extremists from carrying out attacks in the U.S., could now also heighten tensions between the new Trump administration and one of the nation’s most economically and culturally important industries. That’s especially true if Trump goes on to revamp the industry’s temporary worker permits known as H-1B visas, as some fear.

BITING BACK

“I share your concerns” about Trump’s immigration order, Apple CEO Tim Cook wrote in a memo to employees obtained by The Associated Press. “It is not a policy we support.”

“We have reached out to the White House to explain the negative effect on our coworkers and our company,” he added.

Cook didn’t say how many Apple employees are directly affected by the order, but said the company’s HR, legal and security teams are in contact to support them. “Apple would not exist without immigration, let alone thrive and innovate the way we do,” Cook wrote — an apparent reference not only to the company’s foreign-born employees, but to Apple co-founder Steve Jobs, the son of a Syrian immigrant.

Netflix CEO Reed Hastings was forcefully blunt. “Trump’s actions are hurting Netflix employees around the world, and are so un-American it pains us all,” he wrote on Facebook . “Worse, these actions will make America less safe (through hatred and loss of allies) rather than more safe.”

“It is time to link arms together to protect American values of freedom and opportunity,” he continued. Facebook founder Mark Zuckerberg criticized the order in similar, though more carefully couched, terms on Friday .

Technology investor Chris Sacca, an early backer of Uber and Instagram, said on Twitter that he would match ACLU donations up to $75,000 after the organization sued over the ban — and then decided to donate another $75,000 , for a total of $150,000. EBay founder Pierre Omidyar, the child of Iranians, complained that the order was “simple bigotry .”

Tesla Motors and SpaceX founder Elon Musk, who has recently appeared to be cultivating a relationship with Trump, tweeted that “many people negatively affected by this policy are strong supporters of the US” who don’t “deserve to be rejected.” Musk is an immigrant from South Africa.

GOOGLE GRUMBLES

Google told its employees from those countries to cancel any travel plans outside the U.S. and to consult with the company’s human resources department if they’re not currently in the U.S., according to a company-wide note described to The Associated Press. That memo was first reported by Bloomberg and the Wall Street Journal.

Google CEO Sundar Pichai told employees in the note that at least 187 Google workers could be affected by Trump’s order. It is not clear how many of those workers are currently traveling outside the U.S. “We’ve always made our views on immigration known publicly and will continue to do so,” Pichai said in the memo.

Company representatives declined to discuss the memo or to answer questions about the affected employees. In an official statement, Google said: “We’re concerned 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 U.S.”

Microsoft also said it is providing legal advice and assistance to its employees from the banned countries, noting they are all working in the U.S. lawfully.

A BIGGER ISSUE

The tech industry may be bracing for further immigration-related hits. Leaks of draft executive orders, still unverified, suggest that Trump might also revamp the H1-B program that lets Silicon Valley bring foreigners with technical skills to the U.S. for three to six years.

While the tech industry insists the H1-B program is vital, it has drawn fire for allegedly disadvantaging American programmers and engineers, especially given that the visas are widely used by outsourcing firms. Trump’s attorney general nominee, Sen. Jeff Sessions, is a long-time critic of the program.

Venky Ganesan, a managing director at venture capitalist firm Menlo Ventures, acknowledged that the program is “not perfect” and subject to some abuse, but noted that it provides an invaluable source of skilled workers and plays a “pivotal” role in the tech industry.

“If we want to buy American and hire American, we do that best by creating companies in America,” he said. :Having the best and brightest from all over the world come and create companies in America is better than them creating companies in India, Israel or China.”

___

AP Auto Writer Dee-Ann Durbin contributed to this article from Detroit. AP Technology Editor David Hamilton contributed from San Francisco.