A mother in upstate New York has been told she must remove a confederate flag-painted rock from her driveway or risk losing custody of her mixed-race daughter.

The parents, who were solely known as Christie and Isaiah, have long shared legal custody of their daughter, who was born in 2014, and Isaiah was battling for full custody while the mother only allowed him to see her every other weekend, the New York Post reported

According to the court, the flag was ‘inflaming’ Christie’s already tense relationship with the girl’s father, Isaiah.

“Further, and viewed pragmatically, the presence of the confederate flag was a symbol inflaming the already strained relationship between the parties.” the judges said in a ruling released Thursday, May 6.

They determined that the parents could continue to share custody, but that if the rock was not removed by June 1, it would be considered a “change of circumstances” and “‘the parents’ custody agreement could be revisited.”

‘Given that the child is of mixed race, it would seem apparent that the presence of the flag is not in the child’s best interests, as the mother must encourage and teach the child to embrace her mixed race identity, rather than thrust her into a world that only makes sense through the tortured lens of cognitive dissonance,’ said the judges.

The child’s lawyer, Jason Leifer, said the appellate judges “pulled something out of a hat” because the rock was never a point of contention between the parents.

The decision, according to Leifer, may allow feuding parents to express their political beliefs in custody battles, endangering their children.

‘The problem with this appellate decision is that it fails to set a standard for determining actual harm in cases where a parent holds an opinion that the other parent (or the Court) does not approve,’ he said.

‘By making a ruling based upon this assumption, this Appellate Court simply opened the door for litigants in the Third Department to argue that a parent’s political views and opinions are harmful to a child without having to demonstrate actual harm,’ he added.

The father raised the rock as part of a larger debate about why his house was better for the girl to live in.

The case was taken to an appeals court, where the rock was brought to the forefront of the debate.

“Bringing politics into the family court is probably the worst possible thing you could do, and it seems like that’s what the appellate division has opened the door to,” Leifer told The Post via phone.

John Egan, Sharon Aarons, Molly Reynolds Fitzgerald, and John Colangelo—the other four Justices—all agreed.

During the recent reckoning on race, confederate flags have been removed from state capitols, military bases, and public spaces.