The Supreme Court in India has ordered all schools to provide toilets and drinking water for school pupils within six months.
The court said having access to these is an integral part of a child's education.
Research in India shows that wherever toilet facilities are inadequate, parents are reluctant to send their children to school - especially if they are girls.
The Right to Education Forum said 40% of schools in India do not have toilets.
The Supreme Court said that having the basic facilities is part of a child's right to an education.
The judgement said a lack of toilets and drinking water "clearly violates the right to free and compulsory education of children".
The ABC reports the court was acting on a petition filed in 2004 by a charity organisation, which had not been implemented despite several rulings.
State and private schools in the country now have six months to ensure students have access to toilets and drinking water.