A senior Indian government lawyer resigned on Wednesday amid allegations that he was assisting lawyers for the accused in a mob lynching case.
The judge who was hearing the case had issued an order on 25 October seeking action against Naveen Kaushik for “professional misconduct.”
The case relates to the death of Junaid Khan, a 16-year-old Muslim who was killed on 22 June.
A mob attacked him and his friends after calling them “beef eaters”.
Hindus consider cows sacred and killing them is illegal in several states.
Under the ruling Bharatiya Janata Party government, the cow has also become a polarising animal. Restrictions on its sale and slaughter have fanned confusion and violence by vigilantes.
There have been several instances of Muslims being killed for allegedly transporting cattle, and storing or consuming beef.
Mr Kaushik was not part of the case involving Mr Khan’s death but he had reportedly appeared in court in the northern state of Haryana, where the case is being heard.
“The judge noted his presence,” the state’s additional advocate general Baldev Raj Mahajan told BBC. “Mr Kaushik gave his explanation but that was not found to be satisfactory.”
Mr Kaushik, who denied the allegations, said they were the result of a “misconception.”
He had appeared in court because the lawyer for the main accused was a friend who had sought his help on a technical matter related to the language in which the evidence was being recorded.
But the judge alleged that Mr Kaushik had been “suggesting questions” that could be put to witnesses during cross examination at two different hearings, according to The Indian Express.
He also said Mr Kaushik’s actions were against “legal ethics and highly unbecoming” of someone in his position.
“I told Mr Kaushik this wasn’t proper and he should resign,” Mr Mahajan told BBC. “He resigned and we have accepted his resignation.”