NEW ORLEANS (AP) — A 1978 law giving preference to Native American families in foster care and adoption proceedings involving American Indian children is an unconstitutional race-based intrusion on state powers that has caused families to be “literally torn apart,” an attorney told a federal appeals court March 13.

But supporters of the decades-old law say it’s needed to protect and preserve Native American culture and families. In court, lawyers for Indian tribes argued that the law’s definition of an Indian child is based not on race, but on tribal political affiliations.

“A child whose ‘Indian-ness’ is based solely on race ... does not qualify,” said Department of Justice attorney Eric Grant, defending the law.

A federal district judge in Texas last year struck down the Indian Child Welfare Act .

Backers of the law, including numerous tribes and the federal government, say that if the 5th U.S. Circuit Court of Appeals upholds that decision, many Native American children will be lost to their families and tribes.

“Tribal nations are still reeling from generations of our families being separated,” Tyson Johnston, vice president of the Quinault Indian Nation said after the hearing. “So, even though we’ve had good policy like the Indian Child Welfare Act, it’s going to take us many more generations to rectify those past wrongs.”

In briefs filed ahead of the March 13 hearing, the tribes accused the law’s opponents of “paternalistically contending that they know better than Indian families and tribes what is best for their children.”

The case was heard by three of the 5th Circuit judges: Jacques L. Wiener Jr., James L. Dennis and Priscilla Owen. There was no indication when they would rule.

The law has led to some emotional, high-profile cases, including one in 2016 in which a court ordered that a young Choctaw girl named Lexi be removed from a California foster family and placed with her father’s extended family in Utah. Images of the girl being carried away from her foster home drew widespread attention. In 2013, the U.S. Supreme Court ruled the law didn’t apply in a South Carolina case involving a young girl named Veronica because her Cherokee father was absent from part of her life.

Adoptive parents in the current case include Chad and Jennifer Brackeen, a Texas couple who fostered a baby eligible for membership in both the Navajo and Cherokee tribes. The boy’s parents voluntarily terminated their parental rights and the Brackeens petitioned to adopt him. The state denied their request after the Navajo Nation identified a potential home with a Navajo family in New Mexico.

In briefs, they say the Navajo Nation sought to have the child “removed from the home in which he had spent most of his life and given to an unrelated Navajo couple — simply because he was an Indian.”

The Brackeens got an emergency stay and went to court. They were able to adopt the boy in January 2018 after the placement fell through. The boy is now 3, and the couple is seeking to adopt his younger half-sister, according to the brief, “but it is unclear whether that adoption will be permitted under ICWA.”

Attorney Matthew McGill represents the Brackeens and a Minnesota couple, the Cliffords, who were unable to adopt a child who lived with them after having been shuttled among foster homes. “The Cliffords’ family was literally torn apart,” he told the appeals court judges.

Another couple says in briefs that a child who had been living in their home suffered “serious emotional harm” after being removed and given to a grandmother. Still another couple says they were able to adopt a Native American child with severe medical conditions as a result of the Brackeen lawsuit. They and others said they fear the adoption could be legally attacked if the district court ruling is overturned.

The states of Texas, Louisiana and Indiana also joined the lawsuit opposing the Indian Child Welfare Act.

Congress passed the Indian Child Welfare Act in 1978 because many Native American children were being removed from their homes by public and private agencies. In such adoptions, the law requires states to notify tribes and seek placement with the child’s extended family, members of the child’s tribe or other Native American families. Tribes, whose status as sovereign nations is derived from treaties with the U.S. government and acts of Congress, also have a say in foster care placements.

Associated Press reporters Felicia Fonseca in Flagstaff, Arizona, and Stacey Plaisance in New Orleans contributed to this report.