While Trump touted the proposed changes as safeguards to keep non-U.S. citizens from voting, state election officials argued they were ripe for abuse and could cause chaos.

Democratic officials in 23 states and the District of Columbia challenged Trump’s order in a lawsuit filed in U.S. District Court in Boston. They argued that Trump’s order was unconstitutional because the states and Congress, not the president, have the authority to set election rules.

U.S. District Court Judge Indira Talwani, who was nominated by Democratic President Barack Obama, agreed and halted Trump’s order from being implemented for the Nov. 3 elections — but only in the states that have sued.