For years, a United Airlines pilot posted nude and sexually suggestive photos of a female flight attendant online, making references to her job and even posting photos of her partially clothed in her uniform, court records show.

“Look for her when you fly!” one post said.

But according to a federal lawsuit filed Thursday by the Equal Employment Opportunity Commission, United failed to intervene, determining that the pilot’s actions did not constitute sexual harassment in the workplace. The federal agency accuses the airline of discriminating against the woman and failing to protect her from a hostile work environment.

The lawsuit, filed in United States District Court in Texas, asks for compensation for the woman, who is identified as Jane Doe in the lawsuit, and asks for United to eliminate any sexual discrimination and provide equal opportunities for women.

In an email on Friday, a United spokeswoman said the company disagreed with the lawsuit’s description of the situation, but she declined to specify what it disputed. “United does not tolerate sexual harassment in the workplace and will vigorously defend against this case,” she said.