A little more than two decades ago, Congress adopted a sweeping law that outlawed female genital mutilation. But a federal court considering the first legal challenge to the statute found the law unconstitutional on Tuesday.

A federal judge in Michigan issued the ruling in a case that involved two doctors and four parents who had been criminally charged in 2017 with participating in or enabling the ritual genital cutting of girls. The families belong to a small Shiite Muslim sect, the Dawoodi Bohra.

The case has been closely followed by human rights advocates and communities where cutting is still practiced and whose members have moved in rising numbers to the United States and other western countries.

On Tuesday, Judge Bernard Friedman of the United States District Court for the Eastern District of Michigan ruled that Congress did not have the authority to pass the law against female genital mutilation and he dismissed key charges filed against the doctors and removed four of the eight defendants from the case.