An Alabama suburb wanting to form its own school district was dealt a significant blow on Tuesday after a federal court deemed their plans to secede from the Jefferson County school district as racially motivated.

The three-judge panel of the 11th U.S. Circuit Court of Appeals ruled that an earlier decision by a judge allowing the predominately white city of Gardendale, located north of Birmingham, to leave its local school district was a violation of her power.

Judge Madeline Haikala approved Gardendale’s request to leave the Jefferson County school district even though “race was the motivating factor” for their decision.

Judge Haikala wrote in her decision that, despite the racial motives, parents in Gardendale “who support a municipal separation for reasons that have nothing to do with race,” deserve fairness.

“We conclude that the district court committed no clear error in its findings of a discriminatory purpose and of impeding the desegregation of the Jefferson County schools, but that it abused its discretion when it sua sponte allowed a partial secession,” the panel wrote in their decision. “We affirm in part, reverse in part, and remand with instructions to deny the motion to secede.”

Jefferson County is 53 percent white and 42 percent black, according to NBC. Gardendale, with a population of 14,000, is almost 90 percent white.

The Gardendale Board of Education plans to appeal the decision.

“We believe our actions have always reflected only our desire to form a new, welcoming, and inclusive school system to help schoolchildren and parents succeed, and we will continue to fight to achieve this by seeking further review in the federal courts,” their statement read.