Apple, Google, Twitter and Microsoft are among nearly 100 tech companies who filed a legal brief opposing President Trump's immigration ban. The brief says Trump's executive order represents a sudden shift in the rules governing entry into the U.S. and inflicts harm on American companies. (Reuters)

This story has been updated.

Silicon Valley is stepping up its confrontation with the Trump administration.

On Sunday night, technology giants Apple, Facebook, Google, Microsoft, Netflix, Twitter, Uber and many others filed a legal brief opposing the administration’s contentious entry ban. The move represents a rare coordinated action across a broad swath of the industry — about a hundred companies in total — and demonstrates the depth of animosity toward the Trump order.

The amicus brief was filed with the U.S. Court of Appeals for the 9th Circuit, which is expected to rule within a few days on an appeal by the administration after a federal judge in Seattle issued late Friday a temporary restraining order putting the entry ban on hold. The brief comes after a week of nationwide protests against the plan — as well as a flurry of activity in Silicon Valley, a region that sees immigration as central to its identity as an innovation hub.

Companies backing the filing also include Lyft, Pinterest, Yelp, Square, Reddit, Kickstarter, GitHub, Glassdoor, Box, Mozilla, Dropbox, Twilio, Zynga, Medium, Pinterest, and Salesforce.

On Monday, Elon Musk's Tesla and Space X also joined the legal brief. Amazon appears to have stayed out. Amazon's founder, Jeffrey P. Bezos, who also owns The Washington Post, recently said that he supported the lawsuit filed by the Washington state's attorney general against the executive order on immigration and refugees.

An Amazon official said Monday that the state's attorney general preferred that the company not join the brief since the firm is a witness in the original lawsuit.

The filing says that the entry ban, which barred individuals from seven majority-Muslim countries from entering the United States for at least 90 days and suspended the U.S. refugee program, is discriminatory.

“The Order represents a significant departure from the principles of fairness and predictability that have governed the immigration system of the United States for more than fifty years,” the brief said. " … The Order makes it more difficult and expensive for U.S. companies to recruit, hire, and retain some of the world’s best employees. It disrupts ongoing business operations. And it threatens companies’ ability to attract talent, business, and investment to the United States.”

The filing argues that immigration and economic growth are “intimately tied” and that the order would damage the United States' ability to attract the world’s talent.

“Immigrants or their children founded more than 200 of the companies on the Fortune 500 list, including Apple, Kraft, Ford, General Electric, AT&T, Google, McDonald’s, Boeing, and Disney,” it said. The briefing also notes prominent immigrant and refugee writers, scholars and Nobel laureates.

“Long-term, this instability [caused by the executive order] will make it far more difficult and expensive for U.S. companies to hire the world’s best talent — and impede them from competing in the global marketplace,” it says.

“The problems that render the Executive Order harmful to businesses and their employees also make it unlawful,” the brief said.

An estimated 37 percent of the workforce in Silicon Valley is foreign-born, according to the think tank Joint Venture.