WASHINGTON The Supreme Court on Thursday preserved the system that gives preference to Native American families in foster care and adoption proceedings of Native children, rejecting a broad attack from some Republican-led states and white families who argued it is based on race.

The court left in place the 1978 Indian Child Welfare Act, which was enacted to address concerns that Native children were being separated from their families and, too frequently, placed in non-Native homes.

Tribal leaders have backed the law as a means of preserving their families, traditions and cultures and had warned that a broad ruling against the tribes could have undermined their ability to govern themselves.

The issues are complicated Justice Amy Coney Barrett wrote for a seven-justice majority that included the court’s three liberals and four of its six conservatives, but the bottom line is that we reject all of petitioners challenges to the statute.

Justices Clarence Thomas and Samuel Alito dissented, each writing that Congress lacks the authority to interfere with foster care placements and adoptions, typically the province of the states. The decision, Alito wrote, disserves the rights and interests of these children.

But Justice Neil Gorsuch, a Colorado native who has emerged as a champion of Native rights since joining the court in 2017, wrote in a separate opinion that the decision safeguards the ability of tribal members to raise their children free from interference by state authorities and other outside parties.”

The leaders of tribes involved in the case called the outcome a major victory for tribes and Native children.

We hope this decision will lay to rest the political attacks aimed at diminishing tribal sovereignty and creating instability throughout Indian law that have persisted for too long, said a joint statement from Cherokee Nation Principal Chief Chuck Hoskin, Jr., Morongo Band of Mission Indians Chairman Charles Martin, Oneida Nation Chairman Tehassi Hill and Quinault Indian Nation President Guy Capoeman.

President Joe Biden, whose administration defended the law at the high court, noted that he supported the law 45 years ago when was a Democratic senator from Delaware.

Our Nations painful history looms large over todays decision. In the not-so-distant past, Native children were stolen from the arms of the people who loved them, Biden said in a statement.

Congress passed the law in response to the alarming rate at which Native American and Alaska Native children were taken from their homes by public and private agencies.

The law requires states to notify tribes and seek placement with the childs extended family, members of the childs tribe or other Native American families.

Three white families, the state of Texas and a small number of other states claimed the law is unconstitutional under the equal protection clause because it was based on race. They also contended it puts the interests of tribes ahead of children and improperly allows the federal government too much power over adoptions and foster placements, areas that typically are under state control.

The lead plaintiffs in the Supreme Court case Chad and Jennifer Brackeen of Fort Worth, Texas adopted a Native American child after a prolonged legal fight with the Navajo Nation, one of the two largest Native American tribes, based in the Southwest. The Brackeens are trying to adopt the boys 5-year-old half-sister, known in court papers as Y.R.J., who has lived with them since infancy. The Navajo Nation has opposed that adoption.

At last fall’s arguments, several conservative justices expressed concern about at least one aspect of the law that gives preference to Native parents, even if they are of a different tribe than the child they are seeking to adopt or foster.

Among them was Justice Brett Kavanaugh, who was in the majority Thursday in favor of the tribes. But Kavanaugh injected a cautionary note in a separate opinion focused on the preferences for Native foster and adoptive parents.

In my view, the equal protection issue is serious, Kavanaugh wrote, commenting that the race of prospective parents and children could be used to reject a foster placement or adoption, even if the placement is otherwise determined to be in the childs best interests.

The Supreme Court dealt with that issue by determining that neither Texas nor the parents had legal standing to make that argument in this case.

The Brackeens and others can make those arguments in state court proceedings, the justices said.

Matthew McGill, who represented the Brackeens at the Supreme Court, said he would press a racial discrimination claim in state court.

Our main concern is what todays decision means for the little girl, Y.R.J . now five years old who has been a part of the Brackeen family for nearly her whole life. The Court did not address our core claim that ICWA impermissibly discriminates against Native American children and families that wish to adopt them, saying it must be brought in state court, McGill said in a statement.

All the children who have been involved in the current case at one point are enrolled or could be enrolled as Navajo, Cherokee, White Earth Band of Ojibwe and Ysleta del Sur Pueblo. Some of the adoptions have been finalized while some are still being challenged.

More than three-quarters of the 574 federally recognized tribes in the country and nearly two dozen state attorneys general across the political spectrum had called on the high court to uphold the law.

The Supreme Court had twice taken up cases on the Indian Child Welfare Act before, in 1989 and in 2013, that have stirred intense emotion.

Before the Indian Child Welfare Act was enacted, between 25% and 35% of Native American children were being taken from their homes and placed with adoptive families, in foster care or in institutions. Most were placed with white families or in boarding schools in attempts to assimilate them.