A federal court ruled Tuesday that the Virginia House of Delegates unconstitutionally packed African-American voters into 11 legislative districts and ordered the General Assembly to draw new district lines by Oct. 30.

In a 2-1 opinion, a federal panel made up of district and appellate judges ruled that the House violated the U.S. Constitution’s Equal Protection Clause by prioritizing race during the 2011 redistricting process.

“Overwhelming evidence in this case shows that, contrary to this constitutional mandate, the state has sorted voters into districts based on the color of their skin,” Judge Barbara Milano Keenan wrote in the majority opinion.

The court instructed the General Assembly to craft a “remedial districting plan” by the fall, which could lead to a more Democratic-friendly electoral map for the 2019 legislative elections.