Google is ending its involvement with Project Maven, the controversial Pentagon research program that sought to use AI to improve object recognition in military drones.

Diane Greene, head of Google Cloud, told employees during a Friday meeting that the company will let its current contract with the Defense Department lapse in 2019 and that it will not pursue a new one, according to the New York Times and Gizmodo. The announcement comes shortly after Google said it would draft an ethics policy to guide its involvement in future military projects — one that would explicitly ban the use of artificial intelligence in weaponry.

“It is incumbent on us to show leadership [in the ethical use of AI],” Green reportedly said during the meeting.

The decision was made in light of the internal and external controversy generated by Project Maven, according to Gizmodo. Since news of Google’s involvement became public in March, more than 4,000 employees have signed an open letter urging the company to reconsider, and dozens have resigned in protest. AI researchers and executives at London-based Google subsidiary DeepMind, meanwhile, have distanced themselves from the program, citing a 2014 acquisition agreement between the companies that precludes Google from using DeepMind technology in surveillance and military systems.

Internal emails exchanged among Google executives show that Project Maven, despite its controversial nature, was to set the stage for a broader push into lucrative military contracts. One September email thread revealed that Project Maven was expected to generate $15 million in revenue for the company over 18 months and as much as $250 million in the coming years.

Google contributed TensorFlow, its open source AI framework, to the Pentagon while under the Project Maven contract. But the company also planned to build a “Google-earth-like” surveillance system that would allow Defense Department analysts and contractors to “click on” buildings, vehicles, people, large crowds, and landmarks, and “see everything associated with [them].”

“Maven is a large government program that will result in improved safety for citizens and nations through faster identification of evils such as violent extremist activities and human right [sic] abuses,” Scott Frohman, defense and intelligence sales lead at Google, wrote in an email in September 2017. “The scale and magic of GCP [Google Cloud Platform], the power of Google ML [machine learning], and the wisdom and strength of our people will bring about multi-order-of-magnitude improvements in safety and security for the world.”

The emails also revealed that Silicon Valley heavyweights, including IBM, Amazon, and Microsoft, were in the running for AI Defense Department contracts and that Project Maven was “directly related” to a government cloud computing contract worth billions of dollars. The contract isn’t mentioned by name, but it is believed to be the Joint Enterprise Defense Infrastructure (JEDI), a 10-year, $10 billion initiative that seeks to migrate much of the U.S. military’s data to a commercial cloud provider.

Despite optimism among some executives, Li expressed concern about how Project Maven would be perceived. “I don’t know what would happen if the media starts picking up a theme that Google is secretly building AI weapons or AI technologies to enable weapons for the Defense industry,” she wrote. “Google Cloud has been building our theme on Democratizing AI in 2017, and Diane and I have been talking about Humanistic AI for enterprise. I’d be super careful to protect these very positive images.”