Delta Air Lines said it fired two employees after an allegation of sexual misconduct in a cargo office in New York that led to a civil lawsuit seeking $20 million in damages.

The lawsuit, filed Thursday, alleges that a Delta employee masturbated in the office in view of other workers.

The suit was filed by two women who claim they had been terminated earlier after one of them complained about the behavior.

Plaintiffs Lauren Heffernan, a former Delta employee, and Kayla Jenkins, who worked for a Delta contractor, were both cargo agents at John F. Kennedy International Airport.

Heffernan and Jenkins allege Delta allowed sexual harassment in their workplace and that their terminations were retaliation for efforts to have it stopped.

Delta says they were legitimately terminated “for reasons completely unrelated to any allegations of misconduct by others.”

A Delta spokeswoman said Thursday that two other employees were fired after an investigation into the women’s complaints. But she would not say whether they included the man who allegedly masturbated in the office.

Jenkins in the suit alleges that she saw a male employee in February 2016, “sitting at his desk, with his penis out.”

Jenkins told Heffernan, who spoke with an administrative assistant for an executive, according to the lawsuit. The suit says they were told the airline was aware of the behavior but would not take any action because it might cost the longtime employee his job.

Jenkins was fired in May 2016, and was told “she was not working enough hours and that her school was more important,” according to the lawsuit.

Heffernan alleges in the lawsuit that she also saw the behavior in May 2016 but got a similar brush-off when she told her supervisor. Heffernan was suspended and terminated in late May after being late returning from lunch because her car broke down, the suit says.

Brian Heller, a lawyer for the two plaintiffs, called Delta’s contention that they were fired for reasons unrelated to their complaints “a complete distortion of reality.”

Heffernan and Jenkins allege gender discrimination, violation of New York City’s human rights law, sexual harassment and unlawful retaliation.

“Delta takes allegations of inappropriate conduct very seriously,” the company said in a written statement. “We promptly investigate and take appropriate action when issues of this nature are brought to our attention.”