Airlines will be fined 50,000 rupees ($736; £594) if their planes release human waste from toilets in Indian airspace, a court has ruled.
A petitioner had alleged that aircraft had been dumping waste over residential areas near the airport in Delhi.
Plane toilets store human waste in special tanks.
These are normally disposed of once the plane has landed. But international aviation authorities acknowledge that lavatory leaks can occur in the air.
A court has asked the aviation regulator to make sure that aircraft do not release human waste from the air while landing or anywhere near the airports.
The National Green Tribunal, an environment court, also directed the regulator to ensure "that aircraft on landing shall be subjected to surprise inspections to see that human waste tanks are not empty", the Press Trust of India reported.
"If any aircraft is found to be violating such a circular or [their] tanks are found empty on landing, they shall be subjected to environment compensation of 50,000 rupees per default," the court said.
The order followed a plea by a retired army officer who accused airlines of dumping human waste over Delhi's residential areas.
The officer said the "walls and floors" of the terrace of his house near the airport "are splattered with large patches of excreta dumped by aircraft flying in front of the airport".
However, it could not be conclusively proved that the waste came from the flying aircraft.
Also, the aviation ministry contested the petitioner's claim and said the plane toilets stored the waste in special tanks that were normally cleared by the ground crew once the plane landed.
A senior pilot told the BBC these tanks were rarely emptied in mid-air apart from "a rare emergency measure like emptying fuel tanks".
Separately, frozen human waste often forms around the overflow outlets for aeroplane toilets, and then falls to earth.
They are called "blue ice" because of the chemicals added to the toilets in planes to reduce odour and break down the waste. Blue ice falls are unusual, but not unheard of.