In 2014, as a lawyer with two decades of experience, Nancy Saltzman joined ExlService Holdings as its general counsel. At the time, she was the most senior female executive at the publicly traded consulting firm, whose leadership team was dominated by men.

But rather than empower Saltzman, management at Exl gave those men the cover they needed to fire her after she filed a discrimination complaint, according to a $20 million lawsuit filed Monday. It names the company, CEO Rohit Kapoor and several other executives.

According to the complaint, Kapoor “took steps to exclude her from career and advancement opportunities, subjected her to enhanced scrutiny, and micromanaged her” in a manner her male equals were not.

The lack of diversity among Exl leadership was “startling,” according to Russell Kornblith, who is representing Saltzman in the lawsuit. The workplace culture exhibited “stark examples of gender stereotypes” under a management team that was “staggeringly tone deaf."

For some Exl employees, the afternoon of May 21, 2018, was a celebration — it was the company’s 19th anniversary.

For Saltzman, it was a breaking point.

Of the more than 20 employees in attendance, only four of whom were women. The complaint said Kapoor “personally directed that Ms. Saltzman,” as one of the “ladies” in the room, “serve cake to the Company’s junior male employees.”

“Humiliated, Ms. Saltzman was forced to walk across the room to cut and plate slices of cake for the Company’s male employees,” court documents recount, “the vast majority of whom were subordinate to her in rank.”

Soon after a meeting in which Kapoor accused Saltzman of being “very emotional” — a criticism that she said was “grounded in sexist stereotypes” — Saltzman reported the gender discrimination to two executives. She asked the company to form a plan to remedy the situation. Fearing retaliation from Kapoor, she also expressly asked that she be told if he was informed of the allegation. Saltzman planned to take protective steps.

Instead, the board authorized Kapoor to terminate her, which he did; the filing said Kapoor claimed he understood Saltzman’s complaint as a resignation. If there was any doubt or confusion about her willingness to continue in her role, the lawsuit quotes an email from Saltzman to the chairman of the board, which begins, “To be clear, I have not and did not resign.”

“Nancy Saltzman did everything right,” Kornblith told The Washington Post. “She became someone who many women in the company looked up to. Then they put the wolf in charge of the henhouse.”

Saltzman told The Post in a statement that she “was motivated by the number of young women who reached out to me for mentorship and saw my appointment as a symbol of opportunity.”

“Meaningful change depends on women who are willing to speak up and corporate boards who will listen and take them seriously,” Saltzman said. “Corporate leaders should be focused on fostering diversity, not silencing those who complain of discrimination.”

It wasn’t just about the women serving cake to the men, according to the lawsuit.

When every member of the executive team flew abroad for an “important annual client event,” the suit claims Kapoor refused Saltzman’s travel request, then accused her of “not having enough interaction with clients.”

Kapoor reassigned a diversity initiative from Saltzman, who was the first and only woman to serve on the company’s executive committee, according to the lawsuit, which also says he denied her request to collaboratively assign the event and installed the company’s male vice president, who “proposed handing out men’s neckties as a diversity gift.”

Since filing Monday, Kornblith claimed other women have contacted him and his client, disclosing similar experiences with the people named in the complaint.

Exl attorneys did not respond to a request for comment.

Correction: An earlier version of this story misstated the amount of the lawsuit at $2 million. It was filed for $20 million.

Read more: