A pair of toddler sisters at the heart of a two-year adoption dispute are better suited to grow up with the foster parents who raised them since birth than their paternal grandparents, the Minnesota Supreme Court ruled Wednesday.

The 5-2 opinion establishes that although relatives should be considered first when they request to adopt children, it doesn’t necessarily mean they should be given preference when it comes to determining the best interests of a child.

It also means that Princess and Dorothy Knox, ages 3 and 2, will be adopted by their foster parents, Steven and Liv Grosser of Plymouth, rather than their grandparents, Dorothy and Lawrence Dunning of Gautier, Miss., following a heated battle rooted in Hennepin County that also leaves open to questioning the definition of culture in adoption cases and how it affects children. The Grossers are white, while the Dunnings are black. Although state laws have eliminated consideration of race in adoptions, the requirement is to factor a child’s “cultural needs” into determining his or her best interests.

Whether the case was rooted in race “depends on who you ask,” said the Grossers’ attorney, Wright Walling, who called the family “thrilled” with the ruling.

“From my perspective it was never about race, except to the extent that their race and culture is who these children are,” Walling said. “But what does culture mean? My clients living in the suburbs? My clients being white? Mrs. Dunning living in rural Mississippi? The kids living in Minnesota? Those issues have yet to be flushed out.”

Race was a factor — or at least should have been, argued Dorothy Dunning’s attorney, Michael Perlman, who said that ignoring it when it comes to adoption proceedings is like putting on blinders.

“Even if their hearts are in the right place, they can’t give these children the same culture, the same history, the same experiences that relatives can,” he said

The case arose out of separate petitions to adopt the girls filed by the Grossers and the Dunnings. The girls each tested positive for cocaine at birth, and Hennepin County Human Services placed them with the Grossers within days while their mother’s and father’s parental rights were terminated.

The Dunnings first requested to adopt Princess shortly after her birth in 2009, but paperwork was repeatedly stalled in Mississippi. In December 2010, two months after Dorothy’s birth, county officials asked the Grossers to adopt both children, and they agreed. The couple have nine biological and adopted children living in their home, including the girls.

Meanwhile, Hennepin County received the Dunnings’ appropriate paperwork from Mississippi, and resumed considering them as adoptive parents. The Grossers filed to adopt the girls, but the county said it would support the Dunnings in adoption proceedings. The Grossers, by then convinced that they would be better suited to tend to the girls’ developmental delays caused by prenatal cocaine exposure, decided to move forward with their own adoption petition.

Hennepin County District Judge Kathryn Quaintance ruled that it was better for the girls to go with the Grossers, who could more properly address their special needs, noting the “potential emotional and developmental damage that could result from removing the girls from the only home they know,” but expressed hope that the Grossers would keep the girls in contact with their biological family.

The Dunnings appealed, arguing that no other petitions should have been considered if their home was determined a good fit for the girls. The Minnesota Court of Appeals unanimously sided with the Grossers. The Minnesota Supreme Court heard the case in January.

According to the majority opinion, giving first consideration to a relative’s adoption petition, as the law requires, is not equal to giving preference.

“In essence, the Legislature has set up a simple scheme that reflects a common instruction often given to children learning to cross the street: ‘First look left, and then look right,’ ” Justice Paul Anderson wrote in a concurring opinion. He reasoned that relatives should be considered first by “looking left,” but there isn’t a reason not to consider other parties, or “looking right,” to make a fully informed decision for what’s best for a child.

Justice Alan Page disagreed, arguing that competing adoption petitions are not to be considered “side by side” rather than first considering the relative’s petition and moving on only if the placement would not be best for the child.

“I do not believe that the Legislature intended that relatives — who can meet the child’s needs and offer a loving home — be passed over merely because nonrelatives may be marginally ‘better’ in some sense, such as being more affluent or better educated than the relative, or having spent more time with the child.”

Walling, who said his clients were “very aware of what the possibilities were” in terms of the outcome, are relieved. Perlman said despite some tension during the litigation of a “heartbreaking” case, there’s no animosity toward the Grossers.

“I feel that they’re good people. It’s not a personal issue of pitting one side against the other, but it is different in my mind when we have relatives who come forward who are well-qualified who don’t have anything in their background to be denied the right to these children — and to deny the children the right and opportunity to be raised by their own kin — is very difficult.”