A federal judge on Tuesday ruled that the U.S. law banning female genital mutilation was unconstitutional and dismissed charges against several doctors in Michigan who carried out the procedure on underage girls as part Muslim sect’s religious practice.

U.S. District Judge Bernard Friedman ruled that Congress had no authority to enact a law that criminalizes female genital mutilation (FGM). “As despicable as [FGM] may be… [Congress] overstepped its bounds” by banning the procedure, the judge said.

The ruling came after defense lawyers challenged the 22-year-old genital mutilation law that hasn’t been used until 2017 when Dr. Jumana Nagarwala was arrested and accused of mutilating the genitalia of young girls.

DOCTOR PERFORMED FEMALE GENITAL MUTILATION IN MICHIGAN CLINIC, FEDERAL AUTHORITIES CHARGE

Nagarwala allegedly headed a conspiracy, which lasted more than 12 years and involved seven other people, and led to the mutilation of about 100 girls, according to prosecutors, as part of a religious procedure practiced by members of the Dawoodi Bohra, a Muslim sect.

While the charges of performing FGM were dropped, Nagarwala and other conspirators are still facing conspiracy and obstruction charges, according to the Detroit Free Press.

A spokesperson for the U.S. Attorney's Office said officials are reviewing the judge’s decision and will consider appealing it.

Women’s rights groups condemned the ruling, saying it’s a setback to the rights of women in the U.S.

“It’s a giant step backward in the protection of women’s and girls’ rights,” Shelby Quast, the Americas director of Equality Now, told the newspaper. “Especially when there is a global movement to eliminate this practice.”

“It’s a giant step backward in the protection of women’s and girls’ rights ... Especially when there is a global movement to eliminate this practice.” — Shelby Quast, the <g class="gr_ gr_80 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="80" id="80">Americas</g> director of Equality Now,

She said that 23 states don’t criminal FGM, noting that “parents are aware of where there are laws against it and where there are not. And they will take advantage of that.”

FEMALE GENITAL MUTILATION CASE INCLUDES VIDEO OF GIRLS BEING TAKEN INTO A MEDICAL FACILITY

Michigan state Sen. Rick Jones also slammed the ruling.

“I’m angry that the federal judge dismissed this horrific case that affected upwards of a hundred girls who were brutally victimized and attacked against their will,” he said in a statement. “This is why it was so important for Michigan to act. We set a precedent that female genital mutilation will not be tolerated here … I hope other states will follow suit.”

The case in Michigan prompted state officials to pass a state law officially banning FGM. The law carries a penalty of 15 years in prison for assisting or performing the procedure, but applies only to future instances. Nagarwala and other members of the sect were charged under an old federal law passed by Congress.

The federal law was passed in 1996 under the Commerce Clause of the Constitution. The federal judge ruled the banning of the procedure under the clause was unconstitutional.

“There is nothing commercial or economic about FGM,” Friedman wrote in the opinion. “[FGM] is not part of a larger market and it has no demonstrated effect on interstate commerce. The Commerce Clause does not permit Congress to regulate a crime of this nature.”

Shannon Smith, Nagarwala’s lawyer, told the Free Press that they are “unbelievably happy” after the judge’s ruling, saying: “The impact is huge. It eliminates four defendants from the indictment, and it severely punctures major holes in the government’s case.”

The Associated Press contributed to this report.