A voter leaves after voting at City Hall in Round Top, Tex., in 2016. (Lucian Perkins/For The Washington Post)

A FEDERAL judge ruled Wednesday that Texas’s voter identification law is illegal. Again. U.S. District Judge Nelva Gonzales Ramos had previously repudiated the state legislature’s toughest-in-the-nation ballot ID law, and the appeals court above her largely agreed. Now she has found that the state’s second try at imposing voter ID rules is not good enough, either. She is right.

Ms. Ramos found previously that the forms of ID the state would accept made things disproportionately more difficult for minority voters. Polling workers would accept gun licenses, which white people are more likely to carry. But they would not accept other forms of state-issued ID that minority voters might have in greater proportion. In fact, the list of acceptable ID was exceptionally narrow, especially compared with other states. After negative court rulings, the state expanded the list slightly — but not “meaningfully,” Ms. Ramos found. The discriminatory effect still existed.

In the state’s second try, the still-short list of acceptable ID was supposed to be offset by looser rules on casting a ballot in the absence of required documents, allowing people to vote if they explain why they do not have them. Ms. Ramos pointed out that people’s reasons for lacking ID are irrelevant to the question of whether those people are qualified to vote. The state insists that people without sufficient ID not only certify that they are eligible to vote, but also select a qualifying reason for lacking proper documents. The state attached stiff penalties for perjury on either question. In this way, the state would have discouraged people from voting when they did not know or understand whether they were qualified to claim an exemption.

Voter-education initiatives might have helped to clear up the confusion, but the state’s latest law also would not have guaranteed any money for such a program.

Moreover, Ms. Ramos repeated the base truth that colors the whole voter ID enterprise: There is little evidence that in-person voting fraud ever happens in Texas. Out of 20 million votes counted in the decade before the legislature passed its initial voter ID law, there were only two convictions relating to votes cast fraudulently at a polling place. Since the legislature passed that law, “the rate of referrals, investigations, and convictions (detection and deterrence) did not increase,” Ms. Ramos noted.

Unsurprisingly, the judge has found that Texas’s voter ID law is discriminatory not only in effect, but also in purpose. This makes it only more shameful that the Justice Department switched sides — from Texas’s challengers to the state’s defenders — once President Trump came into office. From here, the courts will have to decide whether Texas should be required to consult the Justice Department before changing its voting rules, which would occur under a provision of the Voting Rights Act. Given the legislature’s persistence in pressing discriminatory restrictions on the voting booth, imposing this “preclearance” would be more than warranted.