Jeff Bezos has confirmed that Amazon.com Inc. (AMZN) will continue to bid for controversial military contracts, despite facing pressure from its own employees and other U.S. tech peers to shun the Pentagon.

Speaking at an event for Wired’s 25th anniversary in San Francisco, the online retailer’s founder and CEO said it was essential to help protect the country from outside threats, before criticizing those companies that refuse to work with the Pentagon.

“If big tech companies are going to turn their back on U.S. Department of Defense (DoD), this country is going to be in trouble,” said Bezos. “It doesn't make any sense to me,” he added in reference to other companies shunning government contracts. “One of the jobs of senior leadership is to make the right decision, even when it’s unpopular.”

Bezos, whose private space company Blue Origin recently won three government contracts collectively worth about $2 billion to supply rockets for Pentagon satellite launches, claimed that other tech firms should not cut ties with the Pentagon out of protest against the current government. “I know everybody is very conflicted about the current politics and so on,” he said. “But this is a great country and it does need to be defended.”

Amazon has faced criticism from a handful of its employees over some of the work it has done for the U.S. government, including facial recognition software that critics fear could be misused. 

Similar pressures have so far led several of the online retailer’s biggest tech peers to withdraw from bidding on government contracts. Last week, Alphabet Inc.’s (GOOGL) Google pulled out of the running for a lucrative cloud-computing contract with the Pentagon based on concerns that it would clash with the company’s principles.

Google’s decision, which came shortly after it refused to renew a Pentagon contract for artificial intelligence (AI), paved the way for some of its rivals, including Amazon and Microsoft Corp. (MSFT), to win the Joint Enterprise Defense Infrastructure  (JEDI) contract aimed at modernizing the military's computing systems.

Microsoft employees are against the company’s plans to bid for the $10 billion contract. In a letter, published on blogging site Medium, staff wrote that they joined Microsoft with “the expectation that the technologies we build will not cause harm or human suffering.”

In the letter, employees also accused Microsoft executives of betraying the company's previous pledges. Earlier this year, Microsoft published a report about AI being defined by six core principles: “fair, reliable and safe, private and secure, inclusive, transparent, and accountable.” JEDI, the employees added, ignores those principles in favor of "short-term profits.”