WASHINGTON, D.C. — The Supreme Court is trying to sort out a wrenching adoption case involving a Native American child, a biological father who first renounced any interest in her and adoptive parents who were eventually ordered to hand her over to the father.


The justices heard an appeal Tuesday from the South Carolina couple who wanted to adopt the girl, named Veronica. The outcome of the case was unclear after arguments that included an unusually emotional appeal from the couple’s lawyer. Justice Anthony Kennedy said he wished he could call upon King Solomon to figure it out.


The case turns on the federal Indian Child Welfare Act, enacted in 1978 because Indian children were being removed from their homes and typically placed with non-Indian adoptive or foster parents. The law gives tribes and relatives a say in decisions affecting a child. State courts have been at odds on the law’s application.


The Obama administration, 18 states, several Indian tribes, current and former members of Congress and children’s welfare groups have lined up in support of the father. The National Council for Adoption and the American Association of Adoption Attorneys are among the groups supporting the South Carolina couple.


Dusten Brown, a member of the Cherokee Nation, invoked the federal law to stop the adoption arranged by the girl’s non-Indian mother when she was pregnant and the Charleston-area couple, Matt and Melanie Capobianco. The couple was present at Veronica’s birth in Oklahoma.


Brown had never met his daughter and, after the mother rebuffed his marriage proposal, played no role during the pregnancy and paid no child support after Veronica was born.


But when Brown found out Veronica was going to be adopted, he objected and said the law favored the girl living with him and growing up learning tribal traditions.


South Carolina courts agreed and Brown took Veronica, now 3, back to Oklahoma at the end of 2011, even though she had lived with the Capobiancos for the first 27 months of her life.


The justices seemed to recognize there is no ideal outcome to a case in which one side or other will be left without Veronica. “Domestic relations pose the hardest problems for judges,” Kennedy said.


But Justice Antonin Scalia said the law clearly favors the biological father and does not direct courts to take into account the best interests of the child.


“I know a lot of kids that would be better off with different parents,” said Scalia, who has nine children.


The conservative justice got considerable support from a liberal colleague, Justice Sonia Sotomayor, who does not have children.


“If the father’s fit, why do you think that the federal statute requires that it be given to a stranger rather than to the biological father?” Sotomayor asked Lisa Blatt, the Capobiancos’ lawyer.


Blatt argued repeatedly that Brown had relinquished his parental rights and should not have been allowed to intervene at the last minute to block the adoption. She ended her case by warning the justices about the consequences of a ruling in favor of the father for future cases in which the birth mother is not Native American.


“You are rendering these women second-class citizens with inferior rights to direct their reproductive rights and who raises their child. You are relegating adopted parents to go to the back of the bus and wait in line if they can adopt. And you’re basically relegating the child to a piece of property with a sign that says, ‘Indian, keep off. Do not disturb,”’ Blatt said.


Chief Justice John Roberts, father of two adopted children, seemed sympathetic to Blatt’s clients and pressed Brown’s lawyer, Charles Rothfeld, about why he should win custody of Veronica in spite of his early renunciation of his duties as the father.


When Rothfeld said Brown was excited to learn his girlfriend was pregnant, Roberts said, “He was excited, but there is no doubt he paid nothing during the pregnancy and nothing at the time of the birth, right, to support the child or the mother?”


Rothfeld began to answer. “That is true. But I, I am,” he said before Roberts cut him off.


The chief justice said, “So he was excited by it. He just didn’t want to take any responsibility.”


One outcome that seemed to have some appeal would be for the justices to order South Carolina courts to consider the case anew, with more of an emphasis on the best interests of the child. Paul Clement, representing a guardian appointed by the state to look out for Veronica, suggested such an approach.


“From the child’s perspective, the child really doesn’t care whose fault it was when they were brought in one custodial situation or another. They just want a determination that focuses on at the relevant time, that time, what’s in their best interest,” Clement said.


An evaluation of the child’s interest could well leave Veronica with her father, said Justice Ruth Bader Ginsburg. “Now the child has been some 15 months with the father. So if a best-interest calculus is made now, you would have to take into account uprooting that relationship, would you not?” she asked.


Clement agreed. “We’re not here to try to say that anybody is entitled to automatic custody of this child based on some legal rule,” he said.


A decision is expected by late June.


The case is Adoptive Couple v. Baby Girl, 12-399.


Before Tuesday’s arguments, the court issued a pair of 5-4 decisions that split the court’s liberals and conservatives.


In one, the liberal justices and Kennedy were in the majority to rule that a man doesn’t have to pay his health benefit plan back all of the money he got after an accident. The court said that James McCutchen, a US Airways, Inc., employee, can deduct some portion of his attorneys’ fees before reimbursing the $66,866 in medical expenses that his health plan paid after an auto accident.


In the other, the conservatives and Kennedy prevailed in dismissing a nurse’s lawsuit on behalf of herself and others for unpaid wages.