Alphabet Inc.'s Google delivered a sharp message to staff traveling overseas who may be impacted by a new executive order on immigration from President Donald Trump: Get back to the U.S. now.

Google Chief Executive Officer Sundar Pichai slammed Trump's move in a note to employees Friday, telling them that more than 100 company staff are affected by the order.

"It's painful to see the personal cost of this executive order on our colleagues," Pichai wrote in the memo, a copy of which was obtained by Bloomberg News. "We've always made our view on immigration issues known publicly and will continue to do so."

Story continues below advertisement

Read more: Trump immigration ban 'a boon' for Canadian tech industry, say executives

Read more: Travellers barred from flights; chaos, anger worldwide as Trump ban takes effect

Opinion: Trump's 'vetting' just made the world less free – and less safe

The comments underscore a growing rift between the Trump administration and several large U.S. technology companies, which include many immigrants in their ranks and have lobbied for fewer immigration restrictions. Pichai's note echoed similar statements from tech peers voicing concerns about the harm such policies could have on their businesses.

Following the election, some Canadian technology executives said the Trump administration's immigration policy may help Canada attract more skilled workers in areas where there are shortages.

Canada facing an expected shortage of more than 200,000 information, communications and technology workers by 2020 and Ottawa has pledged to make it easier for skilled foreigners to migrate here. Some players in flourishing domestic tech scene have expressed hope that a Trump victory will lead to a flood of inbound programmers and seasoned executives to help Canadian startups grow.

"I believe that a Trump presidency may usher in a golden age of Canadian technology," Mark Organ, chief executive of Influitive, a fast-growing Toronto-based marketing software firm with 150 employees, said shortly after Mr. Trump's victory.

Story continues below advertisement

Trump signed an executive order Friday prohibiting entry by people from seven majority-Muslim nations for 90 days. Citizens of Syria, Iraq, Iran, Sudan, Somalia, Yemen and Libya would be banned from entering the U.S. for the period, while the government determines what information it needs to safely admit visitors.

The Department of Homeland Security issued a directive on Friday afternoon ordering the Customs and Border Control agency to enforce the order, the New York Daily News reported. Late Friday, some green card and visa holders were already being blocked from boarding flights to the U.S., the newspaper said.

"We're concerned about the impact of this order and any proposals that could impose restrictions on Googlers and their families, or that create barriers to bringing great talent to the U.S.," a Google spokeswoman said in a statement. "We'll continue to make our views on these issues known to leaders in Washington and elsewhere."

Some Google employees were traveling abroad and were trying to get back to the U.S. before the order took effect. The company asked them to reach out to Google's security, travel, and immigration teams for assistance, according to a person familiar with the situation. The person asked not to be identified talking about internal company communications.

The employees in question normally work in the U.S. but just happened to be abroad either on work assignments or vacations. The concern is that even if Google staff have valid visas, they may still be at risk if they're from one of the seven countries and they're outside the U.S. when the order kicks in, the person also said.

One employee rushed back from a trip to New Zealand to make it into the U.S. before the order was signed, Google's Pichai wrote in his memo.

Story continues below advertisement

"We are advising our clients from those seven countries who have green cards or any type of H-1B visa not to travel outside the U.S." said Ava Benach, a partner at immigration law firm Benach Collopy LLP, while noting that the order takes effect immediately.

"No one is really sure whether a green card holder from these seven countries can return to the U.S. now. It's fairly clear that an H-1B visa holder can't," Benach said. The H-1B lets U.S. companies employ graduate-level workers from other countries in technical occupations such as technology, engineering and science.

"If anyone in these situations has the misfortune to have gone abroad recently, it's a treacherous moment, possibly for green card holders too," Benach said.

Other technology companies are likely in a similar situation, she added.

Facebook Inc. Chief Executive Officer Mark Zuckerberg said Friday he was "concerned" by Trump's recent moves to restrict immigration.

Microsoft Corp. inserted language in a securities filing on Thursday on the issue, cautioning investors that immigration restrictions "may inhibit our ability to adequately staff our research and development efforts."

Story continues below advertisement

With files from Sean Silcoff.