Google's decision to fire a programmer who wrote a controversial memo on diversity did not violate the law, a lawyer for a federal agency found.

Jayme Sophir, an associate general counsel for the National Labor Relations Board (NLRB), concluded that fired worker James Damore's memo was sufficient grounds for his firing, Bloomberg reported.

ADVERTISEMENT

Sophir outlined his legal analysis in a six-page document. He wrote that the memo, which Damore forwarded to employees at Google last year, was "so harmful, discriminatory, and disruptive" that it validated Google's cause for firing him over "discriminatory statements."

Damore in his 3,000 word memo argued that Google's diversity initiatives were misguided. He also said biological differences explained why there were more men than women in tech jobs, claiming that men are more suited to high-stress jobs and less prone to neuroticism.

Damore has claimed he was fired for challenging the company's "ideological echo chamber."

But the NLRB lawyer said “employers must be permitted to ‘nip in the bud’ the kinds of employee conduct that could lead to a ‘hostile workplace,’ " and that Damore's "stereotypical characterization of one gender" fell under that kind of behavior.

Damore initially filed a wrongful termination suit, which he withdraw. His lawyer says he is now focusing on a class-action lawsuit against Google, which claims the company discriminates against conservative white men.