LOS ANGELES — Andy Rubin, the man who co-created the Android platform and left Google under a cloud of harassment complaints, is in for one messy divorce.

According to a sensational lawsuit by soon to be ex-wife Rie Hirabaru Rubin, her ex had several mistresses, one of which was “complicit with Rubin in running what appeared to be a sex ring,” according to allegations detailed in a complaint filed in San Mateo County court in California.

Additionally, the complaint looks to annul a pre-nuptial agreement signed before the marriage, one of that cut Rie out of the millions Rubin had banked from Google. The complaint says that Rubin's net worth grew from $10 million to $350 million during the course of the marriage.

The couple wed in 2009, and began divorce proceedings in May 2017.

Rubin left his nine-year stint at Google in 2014 after the search engine giant initiated an investigation, sparked by a employee's complaint to Google's human resources division about her relationship with Rubin. Google paid him a $90 million settlement.

Rubin went on to form the Essential Company, which launched a competing phone to Android and iPhone, that was unsuccessful. In 2017, he took a leave from Essential, following a probe into the relationship with a subordinate at Google.

Many Google employees went public with their distaste for how Google handled the Rubin complaints. "As much as I believe in supporting the company you work for, it's equally important to voice what you vehemently disagree with. We can do so much better," said Google designer Sanette Tanaka Sloan on Twitter.

Meanwhile, Essential is a shell of its former self. A website still functions, but its phone isn't available for sale, and no new products have been released since 2017.

In the complaint, lawyers for Rie paint a picture of a Silicon Valley executive who spent much of his time dwelling on sex. The complaint alleges that Rubin paid for the expenses of multiple mistresses "in exchange for offering them to other men." He did so, the complaint alleges, so that he could watch them engage with other men, and often joined in for threesomes.

Rubin's lawyer Ellen Stross released a statement: "This is a family law dispute involving a wife who regrets her decision to execute a prenuptial agreement. It is full of false claims and we look forward to telling our side of the story."

Follow USA TODAY's Jefferson Graham (@jeffersongraham) on Twitter.