The ruling could have sweeping consequences for minority representation in government and the balance of power in Congress.