The Google programmer fired this week for writing a memo on biological gender differences may sue the online giant for unfair retaliation and violating anti-discrimination laws.

“I didn’t think it was legal for them to fire me,” James Damore told RealClearInvestigations in a phone interview. “I filed two claims with National Labor Relations Board. And I may be pursuing other things.”

Damore hasn’t retained a lawyer but said the timing of his termination, which occurred shortly after he filed the first of his NLRB claims, could give him recourse under a law in California that prohibits retaliation against employees engaged in protected workplace activities, including complaining of harassment or discrimination.

Legal experts say such a case – based on both Damore’s employment activity and his claim of illegal behavior on Google’s part – could stand up in court.

California law also prohibits retaliation against employees reporting illegal activities, and Damore’s memo includes several references to the possibility that Google’s diversity programs violate anti-discrimination laws. This could constitute protected workplace activity even if Google were not actually breaking any laws.

Damore, a 28-year-old senior software engineer who began working at Google in December 2013, was fired Monday night after the leak of an internal memo he wrote regarding company diversity last week. The episode set off a media firestorm with critics on the left decrying the memo as an “anti-diversity screed” and critics on the right assailing the reaction as political correctness run amok.

Damore argued that “personality differences” between men and women – women's “higher levels of anxiety” relative to men, and their “stronger interest in people rather than things” – suggest men and women "differ in part due to biological causes." The memo said “these differences may explain why we don’t see equal representation of women in tech and leadership.” He advocated embracing the differences and said pretending they don't exist hurts female employees.

In a statement following Damore’s termination, Google CEO Sundar Pichai said portions of the memo “violate our Code of Conduct and cross the line by advancing harmful gender stereotypes” in the workplace.

“To suggest a group of our colleagues have traits that make them less biologically suited to that work is offensive and not OK,” Pichai wrote. “It is contrary to our basic values and our Code of Conduct, which expects ‘each Googler to do their utmost to create a workplace culture that is free of harassment, intimidation, bias and unlawful discrimination.’"

Damore counters that Pichai – and those who have attacked his memo as hostile to diversity – are mischaracterizing its provenance and content. He says he wrote the 10-page memo, titled “Google’s Ideological Echo Chamber,” in response to calls for feedback to a company diversity meeting.

His memo not only addressed why 80 percent of the company’s tech jobs are filled by men, but included ideas for addressing the imbalance, such as promoting diversity through “pair programming” (in which workers with different aptitudes team up on product development) and adjustments to “Googlegeist,” an annual survey of employee morale.

The memo was posted on Google’s internal “pc-harmful-discuss” board in July, in response to the June diversity meeting.

“After some of the presentations, I asked questions, and the breakout sessions were all interactive,” Damore said. “I got the idea some of my questions were not appreciated.”

He fleshed out his responses in the memo, which addresses controversial subject matter by drawing, at times, on research by University of Toronto clinical psychologist and cultural critic Jordan Peterson, who has been criticized for his views on postmodern feminism, neo-Marxist theory, and other hot-button issues.

The most provocative portion, however, may have concerned Google’s own diversity efforts, which Damore said could themselves be in violation of anti-discrimination laws.

“I realize that some of our programs may be precautions against government accusations of discrimination, but that can easily backfire since they incentivize illegal discrimination,” Damore wrote. "We can increase representation at an org level by either making it a better environment for certain groups (which would be seen in survey scores) or discriminating based on a protected status (which is illegal and I’ve seen it done)."

Google Director of Corporate Communications Rob Shilkin did not respond to several requests for comment about the memo, Damore’s firing, and the ensuing media dust-up. Inquiries sent to Google’s general media email address got no response. And the law firm of Paul Hastings LLP, which the company has retained in this matter, declined to comment. A colleague Damore identified as having engaged him at the diversity meeting also did not respond.

Damore’s document was available internally for several weeks without drawing much argument.

“Some people – all people who supported my position – emailed me directly,” he said. “But the response was pretty well-contained.”

That changed when Damore shared the memo with an internal email group known as Skeptics last week. Google employees incensed by the memo took to Twitter, posting portions of the document.

“The private messages were positive,” he said. “All the public messages and responses on our internal meme generator were against it. I got a message from one colleague who was told by H.R." -- the human-resources department -- "that he was wrong to support me.”

A PDF version of the complete document showed up in public Monday, though Damore does not know who brought it out of Google’s internal channels. “I never leaked anything,” he said.

Though Pichai accused Damore of having “impacted our co-workers, some of whom are hurting and feel judged based on their gender,” leaked internal discussions show many Google employees agreed with his views.

One Google employee wrote: “I do not think there is consensus on the following things, which are treated as obvious and noncontroversial at Google: Different recruitment/hiring process for employees on color of their skin; Open stereotyping of employees by race and gender on internal sites without public outcry…; Weekly public (though thankfully anonymous) shaming of employees for misdeeds as slight as anachronistic use of ‘guys’ for a mixed gender group.”

Damore also pushed back against the idea that his only supporters were fellow white males.

“Many females and underrepresented minorities have agreed with me,” he said. “The dividing line is whether you are in the progressive echo chamber at Google. If you’re not, you can see through some of the BS. The beginning of the document – about how political correctness can stifle people – really rings true for a lot of people.”

A Los Angeles employment attorney said Damore could have a strong case.

“It is illegal obviously to retaliate against an employee for engaging in a protected activity,” said Rob Hennig of the Beverly Hills firm Hennig Ruiz. “You demonstrate that through temporal proximity: If an employee filed a complaint and then was fired, you can infer there is a relationship between the two. That’s an issue that needs to be adjudicated, but that would potentially be a violation of National Labor Relations Act.”

Hennig also pointed to a section of the Golden State’s labor code prohibiting retaliation against a whistleblower who “has reasonable cause to believe that the information discloses a violation of state or federal statute.”

The memo raised a concern about “setting org level OKRs [objectives and key results] for increased representation which can incentivize illegal discrimination.”

“In California, even if you’re wrong and it’s not illegal, if you are raising the issue in good faith, you are still protected in that activity,” Hennig said.

Though he has yet to file an employment lawsuit, Damore is making a round of major-media appearances. Many of those have been hostile, but the coverage of his firing is also drawing wide attention to Google’s ubiquitous role in managing information and influencing public discussion.

“Part of problem with their mottoes – ‘Don’t be evil’ and ‘Don’t be a jerk’ – is that they are so broad,” Damore said. “They decide what’s evil and who’s a jerk.”