A former Google software engineer has filed a lawsuit full of disturbing allegations of harassment by male colleagues and discrimination by Google.

Loretta Lee worked at Google for eight years before being fired in 2016.

She said she was the subject of lewd comments and once found a male colleague hiding under her desk.

Lee said she only reluctantly reported the desk incident to human resources, fearing retaliation, and was subsequently ostracized by colleagues who she said revised her software code and stalled her projects.

Google says it takes the allegations seriously. The company is dealing with multiple lawsuits accusing it of discriminating against employees on the basis of gender or political views.

A former Google engineer named Loretta Lee has filed a lawsuit against her former employer full of disturbing allegations of harassment — including one in which she said she once found a male coworker hiding beneath her desk.

In that incident, according to Lee's suit, she had been away from her desk and returned to find the man on all fours under her desk. The suit claims he popped out and said "You'll never know what I was doing!"

Lee said the colleague was a relative stranger and she feared he had installed a camera under her desk. The same coworker, she said, approached her the following day, grabbed her lanyard, asked her name, and in doing so grazed her chest.

In her suit, Lee characterized the incident as just one example of repeated harassment during her eight years with Google, a unit of Alphabet.

The former Google engineer Loretta Lee. LinkedIn

"In a male-dominated workplace, Plaintiff was frequently subjected to sexual harassment as her male co-workers engaged in inappropriate behavior and made lewd remarks to her," the lawsuit says, adding that Google "failed to prevent this severe and pervasive sexual harassment."

She said male colleagues would "spike" her drinks with whiskey and then "laugh about it."

One man texted her asking whether she wanted a "horizontal hug," she said, adding that another once turned up at her apartment unannounced with a bottle of alcohol, asking whether she needed help fixing a device. She also said one man slapped her at a party for no apparent reason.

Some of the other allegations described more childish behavior, with Lee accusing colleagues of firing Nerf guns at her.

Lee said she joined Google when she was 26 and its "bro culture" was the only working environment she knew.

She said when the desk incident happened in January 2016 she was encouraged to report it to Google's human-resources department — but did so only reluctantly. She said she was then ostracized by her managers, who she claims made unnecessary revisions to her code and stalled her projects. Eventually, she said, Google persuaded her to take medical leave in February. When she returned, she was fired for "performance issues," her suit claims.

Lee's suit claims she had been a good performer at Google, winning coding competitions and receiving good feedback from managers before her firing.

Lee said Google discriminated against her after she was in a serious car accident

Things started to fall apart, according to the suit, in July 2015, when Lee said she was overworked and took some time out for her mental health. She returned in November but was almost immediately in a serious car accident and needed more time out to recover.

Until that point, she said, Google had been supportive but her managers were not. When she wanted time out for physical-therapy appointments, she said, a senior manager told her she had "better be doing that on [her] own time."

The lawsuit said: "Google’s bro-culture contributed to Plaintiff's suffering frequent sexual harassment and gender discrimination, for which Google failed to take corrective action. Additionally, Google discriminated against Plaintiff on the basis of her disability, failed to accommodate her, retaliated against her, and terminated her."

Google has yet to give its side of the story. "We have strong policies against harassment in the workplace and review every complaint we receive," the company said in a statement. "We take action when we find violations — including termination of employment."

Lee's suit follows a similar lawsuit filed by another ex-Google engineer, Tim Chevalier. Chevalier said he was fired for expressing overly liberal political opinions on internal message boards. The messages, he said, included information about combatting harassment and white supremacy.