A lawsuit in the United States against food producer Nestlé and commodities trader Cargill for involvement in slavery in cocoa farming has been canceled.

The U.S. Supreme Court ruled that the prosecutors wrongly invoked a particular law.

The former child slaves who sued the companies took advantage of the Alien Tort Statute, a law that allows non-Americans in the US to sue in certain cases.

Slavery is therefore not one of them, according to the ruling of the Supreme Court.

The American business community has been trying to limit the scope of that law for some time.

The former child slaves accused an American daughter of the Swiss company Nestlé and Cargill of co-responsible for human rights violations.

The companies are said to have done this by purchasing cocoa from the Ivory Coast while turning a blind eye to the use of child slaves by cocoa farmers.

According to the indictment, they wanted to ensure that the cocoa price remained low.