Air India is probing a captain for alleged harassment after a woman pilot complained against him.

Sexual harassment cases are "often" being witnessed at Air India and the airline needs to come down "very, very heavily" on such offenders, the company's Chairman and Managing Director Ashwani Lohani told employees on Thursday, after a sexual harassment case was filed by its pilot.

On Wednesday, the national carrier said it has set up a high-level inquiry to probe a sexual harassment complaint filed against a commander by a pilot.

"It is shameful that sexual harassment cases are being often witnessed in Air India. We need to come down very very heavily on such offenders," Mr Lohani said in a text message to employees.

According to a complaint filed by the pilot, the alleged incident took place on May 5 in Hyderabad when she was being trained by the commander.

A spokesperson said the pilot in her complaint to the management said the senior captain asked her several "inappropriate questions".

"The instructor reportedly suggested the two to have dinner at a city restaurant in Hyderabad on May 5 after the training session was over. I agreed as I had done a few flights with him and he seemed decent. We went to a restaurant at around 8 pm and this is where my ordeal started," the woman said in her complaint.

"He started with telling me how depressed and unhappy he was in his married life. He also asked me how I coped with my husband living away and whether I didn't need to have sex every day. He asked me if I masturbated. At some point, I told him I did not want to talk about all this and called a cab," the complaint by the woman said.

The pilot alleged that the commander's behaviour worsened during the half-hour wait for the cab. "I was left shocked at this behaviour and felt extremely uncomfortable, scared and humiliated," she said.

The woman said she felt "morally obliged" to report this matter to the airline so that such behaviour is not repeated with anyone else in the future.

An Air India spokesperson said on Wednesday: "As soon as the matter came to our notice, we immediately set up a high-level enquiry."