Michael Bloomberg won an appeal Tuesday to remove himself from a $20 million sexual harassment lawsuit, after a state appellate court in Manhattan said he couldn't be held liable for misconduct under New York City's human rights law.

The lawsuit will still continue against his company, Bloomberg L.P., and Nicholas Ferris, a former supervisor at the company who the plaintiff alleged harassed and raped her. Ferris has denied the allegations.

The Appellate Division, First Department wrote in the decision that the plaintiff, called Margaret Doe, hadn't shown that Michael Bloomberg played a direct role in the harassment she experienced.

"As the plaintiff in this case failed to allege that individual defendant Michael Bloomberg encouraged, condoned or approved the specific discriminatory conduct she alleges in the complaint, we find that the complaint should be dismissed as against Mr. Bloomberg in its entirety," the court wrote.

Bloomberg was represented in the appeal by Elise Bloom from Proskauer Rose in Manhattan. Bloom did not immediately return a call for comment Tuesday.

The plaintiff was represented by Niall MacGiollabhui, who has his own firm in Manhattan. He was acting as appellate counsel for Donna Clancy, founder of the Clancy Law Firm, who declined to comment on the decision.

Bloomberg L.P., where the victim worked when she was harassed, and Ferris, her alleged harasser, are still defendants on the lawsuit, which is expected to press forward despite Tuesday's decision.

The victim brought the challenge in 2016 after she said she was raped and repeatedly harassed by Ferris while she worked at the company in Manhattan.

She claimed the harassment from Ferris began soon after she started in 2012, and that she was raped within the first year of her employment. She said in the lawsuit that she didn't report the behavior because she feared retaliation.

She was also concerned that any complaint she made against Ferris, who was her direct supervisor, would have been ignored or trivialized. She eventually asked that her desk be moved away from him, but didn't tell the company why.

After more than three years with the company, the victim was placed on indefinite medical leave for major depressive disorder and anxiety that she said was caused by what happened between her and Ferris. The company fired Ferris two months later.

In a decision handed down about a year ago, Bronx Supreme Court Justice Fernando Tapia rejected an attempt by Bloomberg to leave the lawsuit, saying it was too early in the litigation to decide whether he could be held liable for the harassment.

Tapia, in the decision, suggested that the discovery process may shine more light on what claims, if any, could be applicable to Bloomberg's role at the company, where he's CEO.

"It is unknown his alleged role if any in creating, encouraging, and condoning a culture at Bloomberg, LLP that plaintiff asserts caused her claims of civil rights violation, employment discrimination, and sexual harassment," Tapia wrote.

The First Department, in its decision Tuesday, disagreed with that analysis. The panel of judges wrote that the claims against Bloomberg hadn't met certain requirements to move forward under a section of the New York City Human Rights Law.

According to the law, the First Department wrote, the plaintiff was required to show that Bloomberg either had an ownership interest or had the power to do more than carry out personnel decisions made by others.

In addition to one of those two prongs, the plaintiff had to show Bloomberg encouraged, condoned or approved the specific conduct that gave rise to the claim. The claims, as alleged, didn't do that, the court said.

"There are no allegations that Mr. Bloomberg was aware of Mr. Ferris's alleged discriminatory conduct toward plaintiff or toward anyone else," the decision said.

The victim had argued that Bloomberg was previously confronted with allegations that his company fostered a culture of sexual harassment and hostility toward female employees, and cited several instances as examples. But the First Department said that wasn't enough to keep him in the litigation.

Associate Justice Sallie Manzanet-Daniels disagreed in a decision dissenting from the three-judge majority.

She wrote that the city's human rights law was intended to be construed more liberally than its counterpart at the state level, and could therefore be used to assign liability to Bloomberg. The victim met the requirements of the city law in her lawsuit, Manzanet-Daniels wrote.

"Under the city HRL, plaintiff is required only to allege that Bloomberg is an individual with an ownership interest and/or someone with the power to do more than carry out the personnel decisions of others, and that Ferris exercised managerial or supervisory authority over plaintiff, which the complaint alleges," she wrote.

Manzanet-Daniels was joined on the dissent by Associate Justice Dianne Renwick. Associate Justice Cynthia Kern wrote for the majority and was joined on the opinion by Associate Justices Marcy Kahn and Peter Moulton.

READ MORE: