WASHINGTON (AP) — The Justice Department on Wednesday sided with challengers of voting laws in Wisconsin and Ohio, saying in court filings that measures in those states unfairly affect minority voters.

The department criticized a Wisconsin law that requires voters to present photo identification at the polls and an Ohio law that limits when voters can cast an early ballot. The court papers from the federal government are aimed at persuading judges that the laws, which are being challenged in court, are discriminatory and block access to the ballot box.

“These filings are necessary to confront the pernicious measures in Wisconsin and Ohio that would impose significant barriers to the most basic right of our democracy,” Attorney General Eric Holder said in a statement.

The Justice Department has warned of legal actions against states after the Supreme Court last year wiped out a major provision of the Voting Rights Act. That provision required select states with a history of discrimination in voting — mainly in the South — to receive Washington’s approval before changing the way they hold elections.

Last year, the department sued Texas and North Carolina over measures in those states. But the government didn’t use that approach in either Ohio or Wisconsin, instead submitting court filings joining with challengers who want the measures declared invalid.

The Wisconsin statute, signed into law in 2011 by Republican Gov. Scott Walker, was earlier struck down by a federal judge in Wisconsin. But the case is now on appeal with the 7th U.S. Circuit Court of Appeals, where the Justice Department submitted a brief calling the statute unlawful. The state Supreme Court was expected to rule Thursday on a separate challenge to the law.

For the law to take effect, Wisconsin officials would have to win in both state and federal courts.

In Wisconsin, Republican backers had argued that requiring voters to show ID would cut down on voter fraud and boost public confidence in the integrity of the election process. But opponents said concerns over voter fraud were overblown and not documented and the true intent of the law was to cut down on turnout among minorities and others more likely to vote Democratic. The Justice Department said in its filing that the law discriminates against black and Hispanic voters.

The brief in Ohio comes in a federal lawsuit filed in May by the state affiliate of the American Civil Liberties Union, predominantly black churches and other groups including the Ohio Conference of the National Association for the Advancement of Colored People.

The lawsuit specifically challenges two recent changes to the state’s early voting rules. One is a directive from Ohio’s Republican Secretary of State Jon Husted that set uniform, early voting times that included limits on weekend and evening hours. The other is to a bill passed this year by the GOP-led General Assembly that shortens the period by six days when voters can cast an early ballot. Instead of 35 days, the early-voting window would be 29. The law eliminates the days in which people could both register to vote and cast a ballot at the same time.

The groups claims that recent cuts to when early voting can take place will make it difficult for tens of thousands of residents to vote and will unfairly affect black voters, who the groups say are more likely to use weekend and evening hours to vote early in elections.