The aftermath of an office affair can get ugly. Ellen Pao explains why.

More than two years after losing a gender discrimination lawsuit against her former employer, Ellen Pao is finally telling her side of the story.

In an excerpt of her upcoming memoir for The Cut, Pao explains why she sued Kleiner Perkins Caufield & Byers, one of the top Silicon Valley venture capital firms, for $16 million in 2012 for retaliation and failing to promote her because she was a woman, and why she has no regrets about this decision despite losing the case on all four counts in a high-profile trial.

When Ladders reached out to Kleiner Perkins about Pao’s allegations, the company refuted the claims.

“We support Ellen Pao’s mission and efforts through Project Include to improve workplace culture for women and other under-represented groups,” the firm said in a statement to Ladders. “However, Pao’s claims against Kleiner Perkins were examined thoroughly during a five-week trial in 2015 and were rejected by the jury which ruled against her on every claim.”

In her retelling, Pao details how an office affair became the catalyst to her lawsuit. After she ended a short-lived fling with Ajit Nazre, a fellow partner at the firm, Pao alleged that Nazre became hostile towards her, excluding her from meetings and giving her negative reviews when he was promoted. When Pao lodged formal complaints, the firm offered to transfer her to a different office. It wasn’t until a fellow female partner came forward with similar harassment allegations that Nazre left the firm with a reportedly plush buyout.

If you have an office romance, plan ahead

Pao’s story is an example of the perils you may face if you enter an office romance. Here are tips to remember before embarking on one.

1. Read up on company policy. Learn if your office romance is allowed and how discreet you’ll need to be.
2. Anticipate the end. No one likes thinking about worst-case scenarios, but it’s important to know how you and your office romantic partner will handle yourselves if the relationship ends. Can you still act professionally? Will one of you need to leave? It’s hard to discuss these things, especially if the relationship is a secret—but if you don’t, there will be even more awkward surprises.
3. Involve human resources. Ultimately, it’s their job to mediate. The is the last resort employees should use if personal mediation doesn’t work. Unfortunately for Pao, Kleiner Perkins didn’t even have a human resources department until she and another female partner raised their concerns about it.

4. Start to wrap your mind around potentially having to leave the workplace if you can’t work out a breakup without awkardness. Office relationships can often get complicated enough, and when the feelings go deeper it becomes harder to stay focused and professional.

The ‘Pao effect’: If you speak up at all, you will influence others

If you do decide to speak up about an office affair gone wrong, be prepared for the flood of publicity it may entail. Cases in which colleagues speak of affairs are rare, and as a result, are widely discussed and even receive news coverage if there is enough money or influence at stake. It can often fall to the person who speaks up to offer uncomfortable details and justify his or her actions on a public stage. It’s a lot of heat to take, and it may transform how you see yourself.

For instance, Pao did not speak much publicly before the case, but since it’s been filed she’s become a prominent speaker about tech discrimination in what’s called the “Pao effect.” Other woman like Uber’s Susan Fowler would come forward with their own stories, causing big changes at other companies.

The excerpt is the first time Pao has shared some details, and they offer an insight into what drove her to take a public role in speaking up about her case and the office culture she worked in. When she was asked by an outside investigator about her complaints, Pao said he asked her why the firm kept women “around” if it was biased against them.

Pao’s sharp response: “If you had the opportunity to have workers who were overeducated, underpaid, and highly experienced, whom you could dump all the menial tasks you didn’t want to do on, whom you could get to clean up all the problems, and whom you could create a second class out of, wouldn’t you want them to stay?”

Although Pao said she would’ve handled aspects of her trial differently now, she does not regret turning down a million-dollar severance agreement, going forward with her case and becoming a face of change in tech.

“I’ll grant that only someone a little bit masochistic would sign up for the onslaught of personal attacks that comes with a high-profile case, but I reject the argument that I wasn’t the right person to bring suit,” she wrote. “I believed I had an obligation to speak out about what I’d seen.”