Google will not allow its artificial intelligence software to be used in weapons or unreasonable surveillance efforts under new standards for its business decisions in the nascent field, the Alphabet Inc.

The restriction could help Google management defuse months of protest by thousands of employees against the company’s work with the U.S. military to identify objects in drone video.

The company instead will seek government contracts in areas such as cybersecurity, military recruitment and search and rescue, Chief Executive Sundar Pichai said.

“We want to be clear that while we are not developing AI for use in weapons, we will continue our work with governments and the military in many other areas,” he said.

Breakthroughs in the cost and performance of advanced computers have carried AI from research labs into industries such as defense and health in the last couple of years. The company and its big technology rivals have become leading patterns and anomalies faster than humans could.

The potential AI system to pinpoint drone strikes better than military specialists or identify dissidents from mass collection of online communications has sparked concerns among academic ethics and Google employees.

A Google official, requesting anonymity to discuss the sensitive issue, said the company would not have joined the drone project last year had the principles already been in place. The work comes too close to weaponry, even though the focus is on non-offensive tasks, the official said on Thursday.

Google plans to honor its commitment to the project through next March. More than 4,600 employees petitioned Google to cancel the deal sooner. Along with at least 13 employees resigning in recent weeks in an expression of concern.

A nine-employee committee drafted the AI principles. The company recommended that developers avoid launching AI programs likely to cause significant damage if attacked by hackers because existing security mechanisms are unreliable.

Pichai added Google reserved the right to block applications that violated its principles. The Google official acknowledged that enforcement would be difficult because the company cannot track each use of its tools, some of which can be downloaded free of charge and used privately.

The company’s decision to restrict military work has inspired criticism from members of Congress. Representative Pete King, a New York Republican, tweeted that Google not seeking to extend the drone deal “is a defeat for U.S. national security.”