McLean-based contracting giant Booz Allen Hamilton said it has settled a lawsuit with a former high-ranking female employee who alleged that she was discriminated against based on her sex and her family responsibilities.

Molly Finn is one of two former female executives who filed suit in 2011 against the company, painting a picture of a workplace where women were unable to advance to the top leadership positions.

Booz Allen, which denied doing anything improper, declined to make public the terms of the settlement, and a spokesman for Finn declined to comment.

In her suit, Finn said Booz Allen “intentionally and completely excludes women” from the company’s highest levels.

Her lawsuit, which was scheduled to go to trial at the end of the month, named the company as a defendant along with Ralph W. Shrader, Booz Allen’s chief executive, chairman and president, and other senior officials.

Finn said in court filings that she joined Booz Allen in 1986 and became the highest-ranking woman there before her 2010 termination. She alleged that she was instructed by a top executive to stop saying “pro-woman, feminist things” to Shrader.

Booz Allen denied that discrimination played a role in her dismissal, saying top executives are expected to perform.

“The higher you go in the firm . . . the risk is higher,” Marie Lerch, a Booz Allen spokeswoman, said in an earlier interview. “We feel that we treated her fairly.”

According to company-provided statistics, there are 20 female partners at the firm, making up just over 24 percent of the total number. That’s an uptick from 2008, when the contractor had 20 female partners out of a larger pool of 104 total partners.

Still ongoing is a lawsuit filed by former Booz Allen partner Margo Fitzpatrick, who worked for the contractor from 1999 until she was let go in 2010. In her suit, she has alleged that gender discrimination played a role in her termination as well, and that Booz Allen had a “glass ceiling” that excluded women from the highest ranks.