SAN FRANCISCO — Don't mess with DACA.

That was the message from major technology companies who are pressuring lawmakers to take swift action on a legislative fix after the Trump administration said it would jettison an immigration program that allows young people who were brought to the U.S. illegally as children to remain here.

Apple and Microsoft, two of the companies to come out swinging against the president's decision to dump Deferred Action for Childhood Arrivals, or DACA, pledged to shield employees who could face legal troubles or deportation.

Microsoft President Brad Smith urged Congress to move swiftly with legislation to preserve the immigration program, even prioritizing DACA over tax reform.

“We say this even though Microsoft, like many other companies, cares greatly about modernizing the tax system and making it fairer and more competitive," he wrote.

The Trump administration on Tuesday began winding down the Obama-era immigration program that has allowed some 800,000 young people to study and work in the U.S., but invited Congress to address it through legislation within six months.

The sharp rebuke from Silicon Valley reflects the toughening stance toward Trump administration policies as tech companies seek to protect their business interests and preserve their public image as the "Do no evil" wing of corporate America.

A series of clashes over immigration including the president's executive order banning immigration from Muslim-majority countries, trade and, most recently, Trump's controversial remarks in Charlottesville, Va., have widened the political divide between the White House and Silicon Valley.

Posing the greatest threat to the tech industry is Trump's "Hire American" policy and his administration's growing efforts to curb immigration. Changes to the nation's immigration rules could undercut the employment practices and bottom lines of major tech companies, both through restrictions on legal immigration — temporary H-1B visas —and on young people who work in tech through DACA.

"This is just the latest chapter of Silicon Valley feeling that the president is out of touch certainly with their needs here, if not the nation's," said Larry Gerston, professor emeritus of political science at San Jose State University.

For Silicon Valley, immigration has been the key to the greatest wealth creation machine on the planet. Engineers and entrepreneurs from overseas have played a vital role in building and running some of technology's most powerful companies. Tech companies say they rely on that steady stream of skilled talent, frequently on H-1B visas, to build their products and companies and to address an acute shortage of engineers.

"In Silicon Valley, there's this natural affinity for immigrants," Gerston said. "There's also a sense that immigration has provided an immense source of talent, not just the people who have started companies but those on H-1B visas and DREAMers who come out of college to work as programmers and engineers."

DACA is a cause taken up by many who work for major tech companies. It also matters to the vast communities of people around the globe who use these companies' services. Many in the public have also come to expect tech CEOs to play the role of social warriors.

In a blog post Tuesday, Smith said Microsoft would pay for employees’ legal counsel and would intervene in court cases to defend DACA.

Apple CEO Tim Cook said he was “deeply dismayed” by Trump’s decision and said his company would work with Congress to "advocate for a legislative solution that provides permanent protections for all the Dreamers in our country."

Apple will provide the approximately 250 employees at Apple potentially affected by the termination of DACA with the support they need, including the counsel of immigration experts, he said.

Among the other tech company CEOs speaking out were Google CEO Sundar Pichai and Box CEO Aaron Levie.

Tech companies, which used to shy away from Washington, are now some of the most powerful corporate interests there, shaping a range of policies from immigration to privacy to taxes. While the tech industry stands to benefit from looser regulations and tax reform embraced by the Trump administration, its opposition to the administration's positions on immigration has escalated.

Following Trump's first immigration order, Facebook CEO Mark Zuckerberg wrote: "I hope we find the courage and compassion to bring people together and make this world a better place for everyone."

Zuckerberg: Ending DACA is 'particularly cruel'

That tone has changed dramatically as Silicon Valley finds itself increasingly at odds with Trump.

Zuckerberg said Tuesday that the termination of DACA marked a "sad day" for the country and urged Congress to step in.

"The decision to end DACA is not just wrong," Zuckerberg wrote in a Facebook post. "It is particularly cruel to offer young people the American Dream, encourage them to come out of the shadows and trust our government, and then punish them for it."

Last week hundreds of executives urged Trump not to rescind DACA. Ending DACA could endanger 700,000 jobs, according to research released this week by FWD.us, a pro-immigration group co-founded by Zuckerberg, and the Center for American Progress, with data from the Cato Institute. Some 91% of DACA recipients are employed. If Trump ends the program, 1,400 people of them will lose their ability to work each business day, the research found.

The stakes are high for the tech industry when it comes to immigration. The industry says it needs overseas labor to stay competitive globally, and for years it's funneled millions into Washington lobbying operations to try to loosen restrictions on the H1-B program.

That temporary visa program grants 65,000 work visas a year, with 20,000 more handed to foreigners with advanced degrees and an unlimited number made available to universities, teaching hospitals and the like.

Most of the visas go to technology companies. Major companies such as Apple, Facebook, Google and Microsoft employ thousands of H-1B workers. Fwd.us has been on the front lines of increasing the number of H-1B visas permitted each year.

The program is controversial with labor unions that say tech companies rely on these visas to hire cheaper labor that come with far fewer benefits and protections than American workers receive. On the campaign trail, President Trump promised to axe the H1-B program. In April, he signed an executive order that called for a review and suggested changes.