A district court judge has struck down a rule Iowa’s Republican secretary of state had drafted in hopes of removing ineligible voters — non-citizens — from the state’s voter registration rolls.

Matt Schultz, as secretary of state, is also the state’s commissioner of elections. The judge ruled Schultz did not have the authority to do what he wanted to do. The judge cited Iowa law which lists six circumstances in which the secretary of state may remove names from the list of eligible Iowa voters and none of those six deal with citizenship.

The American Civil Liberties Union of Iowa and the League of United Latin American Citizens of Iowa filed the lawsuit. The judge ordered Schultz to pay their legal bills. Schultz plans to appeal.

Schultz tried before the 2012 election to cross-check a list of registered voters he suspected weren’t legal citizens with a federal database, but the lawsuit was filed and that plan was put on hold. The rules Schultz drafted were never put into effect either, because of the lawsuit.

Schultz was elected secretary of state in 2010 and has focused on the issue of voter fraud. He is now running for congress.