SAN FRANCISCO — When Liz O’Sullivan was hired at the New York City-based artificial intelligence company Clarifai in 2017, she felt lucky to find work at the intersection of two of her main interests: technology and ethics. Two years later, she found herself facing a moral dilemma.

Clarifai was developing aerial photography and object detection tools as one of several companies working on Project Maven, a Pentagon drone surveillance program. After several conversations with friends and colleagues, O’Sullivan realized this type of technology eventually could be used for autonomous weapons.

In January, she wrote to Clarifai CEO Matt Zeiler on behalf of a group of employees, seeking clarification on whether the technology would be used to create weapons and asking him to commit to a series of ethical measures. Zeiler later explained at a meeting that Clarifai likely would provide tech for autonomous weapons. O’Sullivan quit the next day.

“I was very surprised and had to follow my conscience,” she said. Zeiler and Clarifai didn’t respond to a request for comment from the Associated Press, though Zeiler has previously said the company’s Project Maven involvement aligns with its mission of accelerating human progress with continually improving AI.

O’Sullivan, 34, considers herself part of a “growing backlash against unethical tech,” a groundswell in the past two years in which US tech employees have tried to remake the industry from the inside out — pushing for more control over how their work is used and urging better conditions, job security and wages for affiliated workers.

While some speak out and others sign petitions and attend rallies, workers are collectively taking action like never before:

Amazon and Microsoft employees demanded the companies stop providing services to software company Palantir, which provides technology to federal agencies including Immigration and Customs Enforcement and the US Army.

Amazon employees also have urged the company to transition to renewable energy and confronted CEO Jeff Bezos at a shareholder meeting.

Following last year’s walkouts over Google’s handling of sexual misconduct cases, employees signed a letter protesting Project Dragonfly, a search engine that would comply with Chinese censorship.

Staff at Salesforce, Microsoft and Google have protested their companies’ ties to Customs and Border Protection, ICE and the military.

Despite six-figure salaries and unlimited vacation time, many tech workers are questioning the effects of their work and joining forces with their more precarious blue-collar, service and contract-worker counterparts, pressing for better work conditions and pay.

“It’s unprecedented, both the magnitude of the power of these companies and the willingness of white-collar employees to shake themselves of the privilege that they have and to really see the impact of the work they’re doing,” said Veena Dubal, a professor at the University of California Hastings College of the Law who has interviewed dozens of tech workers involved in organizing.

They’re feeling emboldened because of national and global “existential crises” and the realization that tech companies “have more power than any multinational corporation has had in a long time,” Dubal said.

The phenomenon is particularly strong in the San Francisco Bay Area, home to Salesforce, Google and Palantir, among others. The bastion of activism and progressive culture has been hit hard by the tech boom’s housing affordability crisis.

“There’s a lot of power (that) people are being asked to build for the shareholders of these companies and the management of these companies,” said Ian Busher, 28, a former contract analyst for Google and an organizer with the Bay Area chapter of Democratic Socialists of America. “If you want to make the world a better place, you should exercise judgment and democracy with the people you’re working with to build these tools.”

Facebook and Palantir did not respond to requests for comment.

An Amazon spokesperson declined to comment on employee activism but noted the Seattle-based company is committed to sustainability and said it provides good pay and benefits and humane conditions at its warehouses. At the stakeholder meeting, Bezos didn’t directly address employees’ renewable energy demands but referred to some sustainability efforts already underway.

A Microsoft spokesperson said the company, headquartered in the Seattle area, appreciates employee feedback, respects differing views and provides “many avenues for all voices to be heard.”

A Google spokesperson did not comment on specific incidents but emphasized that retaliation is prohibited and pointed to CEO Sundar Pichai’s previous statements on worker dissent.

“There are many things good about giving employees a lot of voice,” he said at a November conference. “There are decisions we make which they may not agree with.”

Congress has begun to aggressively scrutinize the industry in recent years and the Justice Department last month launched an investigation into big tech companies amid antitrust allegations. A recent Pew Research Center survey indicated Americans have an increasingly negative view of tech’s effect on the country.

“As an employee in the tech sector right now, there is a fair bit of guilt or (asking), ‘What is my responsibility?’” said Kellie McElhaney, a professor at the Haas School of Business at UC Berkeley.

Amr Gaber, 32, a Google engineer, was among several tech workers at a July demonstration in front of Facebook’s San Francisco office supporting cafeteria workers seeking a new contract. He said although the white-collar workers are more privileged, they’re all working people.

“Our fortunes are tied together,” Gaber said. “If the (companies) can’t even treat the people who work for them well, then how can we expect them to have a positive impact on society?”

There’s evidence companies are listening.

Google and Facebook pledged to pay contract workers better and provide some benefits. Google ended forced arbitration for sexual misconduct cases after its employees walked out. Following employee outcry, Google declined to renew its contract with the Pentagon for work on Project Maven.

When employees asked Microsoft to cancel its contract with ICE, CEO Satya Nadella clarified that the company was not contributing to family separations at the border but supporting email, calendar and document systems.

A Salesforce spokesperson said conversations with employees led the company to create the Office of Ethical and Humane Use of Technology and “hire a chief ethical and humane use officer to develop guidelines and evaluate situations around the ethical use and development of our technology.”

In the wake of concerns about tech’s impact on the Bay Area housing crisis, Salesforce CEO Marc Benioff this year gave $30 million to UC San Francisco to research homelessness, after donating $6 million to the city last year to help provide supportive housing for the formerly homeless. Pichai, Google’s CEO, also pledged $1 billion to build 20,000 homes over a decade.

Such responsiveness is good for business and for building trust with customers and employees who are more inclined to express their demands, according to McElhaney.

“Those who are not responding are … missing a huge ocean liner that’s already left the dock,” she said.

Still, some tech workers say the companies’ efforts fall short. In some cases, employees have said they’ve seen or experienced retaliation after they or others have spoken out.

“We say that tech workers have a lot of power, but tech executives have more,” said O’Sullivan, who quit on principle and now has a job at a young tech company pursuing transparency in the use of artificial intelligence. “The best way to impact change is through legislation and regulation.”