A former Google engineer has filed an explosive lawsuit against the search giant, claiming it failed to police an out-of-control “bro culture” that turned its headquarters into a hotbed for sex harassment.

During her seven years at Google’s Mountain View, Calif., offices, Loretta Lee was frequently bullied, touched inappropriately and even pummeled with Nerf balls and darts by male colleagues, according to the suit.

Google did nothing to stop the abuse and pervy come-ons that Lee endured on a near-daily basis, according to the lawsuit filed in California state court last week, which was first reported by the San Jose Mercury-News.

“Google’s bro-culture contributed to plaintiff’s suffering frequent sexual harassment and gender discrimination, for which Google failed to take corrective action,” the suit claims.

Lee alleges that male coworkers regularly “spiked her drinks with whiskey and laughed about it,” as well as “shot nerf balls and darts at her almost every day.”

Lee allegedly came to work one day to find a male coworker hidden under her desk. The next day, the same man “grazed her breasts” with his hand, under the guise of looking at her name badge that hung on a lanyard around her neck.

The engineer also claimed she occasionally received “disturbing and bizarre messages” from men she worked with, including a text from one who asked if she wanted a “horizontal hug.”

In one instance, the lawsuit states that a male colleague “showed up at her apartment with a bottle of liquor and offered to work with her to fix a problem she was having with one of her devices.” When Lee asked the creep to leave, he refused.

In another, Lee was slapped in the face by a drunk male coworker at a holiday party “for no apparent reason.”

When Lee filed a formal complaint to HR, she alleges that her coworkers retaliated by refusing to approve any code she subsequently wrote. That led, she claims, to her being labeled a “poor performer” after a few weeks and, eventually, her termination in late February 2016.

“We dispute the allegations made in Ms. Lee’s complaint. We have strong policies against harassment in the workplace and review every complaint we receive,” a Google spokesperson told The Post. “We take action when we find violations — including termination of employment.”

This story originally appeared in the New York Post.