Google fired an employee Monday who wrote an internal memo critical of the company's diversity policy.

James Damore, a Google engineer who wrote the note that went viral over the weekend, accused the company of quashing conservative political opinions and claimed biological differences explain a lack of women in tech and leadership positions.

"At Google, we're regularly told that implicit (unconscious) and explicit biases are holding women back in tech and leadership," Damore wrote in the memo. However, he said, that's "far from the whole story."

Damore confirmed his firing in an email to Bloomberg, saying he had been dismissed for "perpetuating gender stereotypes."

Conservatives criticized Google for firing Damore over something he wrote.

"Diversity = banishing people for thought crimes," wrote Tim Miller, a former spokesman for Jeb Bush, on Twitter.

John Podhoretz, a contributor to the New York Post and editor of Commentary, referred to Google's decision as "totalitarian evil."

Google CEO Sundar Pichai sent a note to employees Monday explaining why the company opposed the memo.

"To suggest a group of our colleagues have traits that make them less biologically suited to that work is offensive and not OK," he wrote. "Portions of the memo violate our Code of Conduct and cross the line by advancing harmful gender stereotypes in our workplace."