Order comes days before ballots go out for the midterms.