A former Google employee has sued the company, alleging that it fired him for writing internal posts against racism and sexism, Gizmodo reported on Wednesday. Tim Chevalier filed the lawsuit against Google for “discrimination, harassment, retaliation and wrongful termination”.

Chevalier, a software developer and former site-reliability engineer at Google, was ousted in November 2017 after he responded to an anti-diversity memo written by James Damore, who too was fired allegedly for criticising Google for its diversity policy. However, the United States National Labour Relations Board rejected Damorea’s complaint recently and said Google did not violate labour laws when it fired him.

Chevalier is one of the four employees who claimed they were disciplined for speaking out internally against racism and sexism. “It is a cruel irony that Google attempted to justify firing me by claiming that my social networking posts showed bias against my harassers,” he told The Verge.

He alleged that Google failed to protect its female, minority and LGBTQ employees from harassment on internal forums. Instead, the company took action when such employees spoke out about their experiences with racism, sexism and homophobia at work, alleged Chevalier, who is transgender, queer and disabled.

Google spokesperson Gina Scigliano said the company was enforcing its policy against promoting harmful stereotypes. “An important part of our culture is lively debate,” Scigliano said. “But like any workplace, that does not mean anything goes. All employees acknowledge our code of conduct and other workplace policies, under which promoting harmful stereotypes based on race or gender is prohibited.”