Ohio voters will have an extra week of early voting in the midterm elections after a federal judge on Thursday ruled a new state law violates the federal Voting Rights Act. 

U.S. Federal Judge Peter Economus issued a preliminary injunction barring the enforcement of an Ohio law passed earlier this year that cut the early voting period in Ohio from 35 days to 28 days and eliminated a so-called golden week in which citizens are allowed to register and vote at the same time. 

The judge ruled the law signed by Gov. John Kasich (R) violated Section 2 of the Voting Rights Act, which prohibits voting practices that discriminate based on race, color or language. 

"The Court orders the preliminary relief described below with the purpose of preventing irreparable injury, in the form of infringement to their fundamental right to vote, to the plaintiffs," the judge wrote in regard to the lawsuit filed by the American Civil Liberties Union on behalf of the NAACP.

The judge, appointed by former President Clinton, also ruled Ohio violated the Constitution by not including evening or Sunday early voting and ordered them to be restored. Individual counties in the state will also be allowed to establish extended early voting, the judge ruled.  

Because of the ruling, early voting in Ohio will start Sept. 30, and people will be able to vote on the same day they register for the following week, until registration closes. 

The judge said the injunction only pertains to the 2014 election year. He will consider a permanent injunction at a later date. 

The ruling is a win for the NAACP and also the Obama administration. The Justice Department filed a statement of interest in the case earlier this year, arguing the state was misinterpreting the Voting Rights Act. 

"These two states’ voting laws represent the latest, misguided attempts to fix a system that isn’t broken," Attorney General Eric Holder said in July about laws in Ohio and Wisconsin. "These restrictive state laws threaten access to the ballot box."

The NAACP argued the restrictions had disproportionately affected African-American and low-income voters, demographics typically aligned with the Democratic Party.