When President Donald Trump sat down with leaders from Apple, Google, Amazon, Facebook and other tech firms shortly after his election, the meeting was more of a cordial gathering than a fiery clash between government and an industry that powers the economy.

Trump’s immigration order has ignited a new level of activism among tech firms, underscoring the contentious relationship emerging between the new administration and an industry made up of and founded by many immigrants. Some executives said speaking out about the administration’s actions is as much a moral issue as a financial one for them.

“There really isn’t a clearer time when leaders and organizations must be principled on what America stands for,” Box CEO Aaron Levie wrote in a Medium post, urging people to donate to the American Civil Liberties Union.

On Monday, employees at Google’s Mountain View headquarters and offices around the world walked out to protest Trump’s immigration order.

“There are some values, which are really near and dear to your heart,” Google CEO Sundar Pichai told employees, according to a video posted online. “It’s foundational and something which you should never compromise on, and the thing we are debating for the past three days is one of them.”

The company, which said in an internal memo to employees that the order affected at least 187 of its workers, launched a $4 million immigration crisis fund.

For tech executives, many of whom are immigrants, Trump’s order hit close to home, clashing with the very workplace culture they’re trying to foster in Silicon Valley, experts noted. Tech companies are also competing to attract the best minds — no matter where they’re from — for technical skills and knowledge.

“I think they have to maintain a culture that’s inclusive and fair, which is basically both good business and good morals,” said Regis McKenna, a longtime Silicon Valley marketing consultant known for working with Apple on the launch of its first personal computer.

Carl Guardino, president and CEO of the Silicon Valley Leadership Group, a public policy trade association that represents more than 400 of Silicon Valley’s employers, said the group is focusing on responding to issues without attacking an individual or institution.

“We honor the institution of the presidency and yet believe as responsible citizens in a core need to respond when we believe something is not only bad for our workers and economy, but could hamper America’s moral authority around the globe,” he said.

Throughout the weekend, tech executives such as Apple CEO Tim Cook — who was among those at Trump’s December tech summit — assured employees that they’ve voiced their concerns to the White House. Google co-founder Sergey Brin — a refugee himself — joined protesters at San Francisco International Airport over the weekend as tech execs denounced the news, offered free services to refugees and those stranded at airports, and opened up their wallets to match donations to the American Civil Liberties Union and other immigration advocacy groups.

Trump’s Friday order barred all refugees from entering the United States for 120 days and blocks the acceptance of Syrian refugees indefinitely. It also blocked citizens of Sudan, Iran, Iraq, Libya, Somalia, Syria and Yemen, which are predominantly Muslim countries, from entering the United States for 90 days.

There is nothing nice about searching for terrorists before they can enter our country. This was a big part of my campaign. Study the world!

Facing growing pressure from their own employees and the public, tech executives are publicly denouncing the order on social media and in internal memos to employees.

Some tech moguls, including Tesla CEO Elon Musk, are also trying to work with the Trump administration, but have opposed the executive order.

Musk, who along with Uber CEO Travis Kalanick is a member of Trump’s business advisory team, tweeted that barring citizens from primarily Muslim countries was “not the best way to address the country’s challenges.” Musk, who faced criticism after he said ExxonMobil CEO Rex Tillerson might make an “excellent” secretary of state, also asked for suggestions about what needs to be changed in the executive order.

“I suspect some people want to have a seat at the table rather than stand outside,” McKenna said.

Yet businesses are also facing consequences for how they reacted to Trump’s immigration order. Kalanick spoke out against the ban, but #deleteUber took off in response to the company removing surge pricing after New York taxi drivers halted airport pickups to join protesters at John F. Kennedy International Airport.

Uber’s competitor Lyft pledged to donate $1 million to the American Civil Liberties Union, which is suing the Trump administration over the immigration ban and has reportedly raised more than $24 million in online donations since Saturday. Uber also made a $3 million pledge of its own to help drivers with immigration services.

TechNet, the national, bipartisan network of “innovation economy” CEOs and senior executives, issued a statement from its president and CEO Linda Moore, saying while the group’s members “recognize and support efforts to fight terrorism,” they believe Trump’s actions “create considerable uncertainty in our nation’s immigration system and will adversely impact technology workers who live and work in our nation.”

TechNet points out that “immigrants or the children of immigrants have started more than 40 percent of Fortune 500 companies. These companies employ more than 10 million people.”

Silicon Valley has a strong reason to speak out: About 53 percent of its engineers are foreign-born, Guardino said.

“Part of the American ideal is people are willing to be the voice for the voiceless,” he said. “If that’s what it takes in these circumstances, we will be that voice.”

Queenie Wong covers social media businesses, including Facebook, Twitter and LinkedIn, for The Mercury News. She grew up in Southern California and is a graduate of Washington and Lee University where she earned bachelor's degrees in journalism and studio art.