MOUNTAIN VIEW — Google fired a disabled, queer, transgender engineer for opposing discrimination, harassment and white supremacy among his fellow Googlers, a lawsuit filed Wednesday alleged.

The site reliability engineer, Tim Chevalier, claimed in the suit that the Mountain View tech giant’s workplace culture was discriminatory toward minorities.

“Google’s internal social networking platforms were widely used to belittle and harass women, people of color, LGBTQ employees, and other underrepresented groups,” Chevalier alleged in the lawsuit filed in California state court in San Francisco.

But after he pushed back against the “online bullying” he and others were suffering at the hands of colleagues, Google terminated him, Chevalier claimed.

Google said in a statement that “lively debate” is important to its company culture, but “that doesn’t mean anything goes.” The firm’s code of conduct prohibits promotion of harmful stereotypes based on race or gender, said spokeswoman Gina Scigliano.

“The overwhelming majority of our employees communicate in a way that is consistent with our policies,” Scigliano said. “But when an employee does not, it is something we must take seriously. We always make our decision without any regard to the employee’s political views.”

Chevalier’s supervisors were critical of his efforts to change the company’s culture, he said in the suit.

“Human Resources explicitly told Chevalier that Google was ending his employment because of his political statements in opposition to the discrimination, harassment, and white supremacy he saw being expressed on Google’s internal messaging systems,” the suit said.

Chevalier, who was born female but transitioned to male in 2007, is disabled by post-traumatic stress disorder and a sleep disorder, the suit said.

“Chevalier’s identity did not conform to the typical Google employee,” according to the suit, which noted that the firm’s employees were overwhelmingly white, male and non-transgender.

Google “cultivated” harassment by giving workers multiple internal forums for them to comment on each others’ posts, the suit charged.

In 2016, one employee posted the question, “If we have fewer Black and Latin@ people here, doesn’t that mean they’re not as good?” the suit said. “Other Googlers suggested that by encouraging the hiring of underrepresented minorities, Google was lowering the qualifications to work at Google.”

Although Chevalier reported discrimination and harassment to HR — including the posting on an internal forum of a link to a website targeting him for being transgender — Google took no steps to stop it, he claimed in the suit.

Chevalier also alleged that his colleagues frequently argued that women and minorities were less competent in tech jobs, and one co-worker wrote in an internal forum that homosexuality was immoral.

He is seeking unspecified damages.