COLUMBUS, Ohio (AP) — A federal judge in Ohio on Friday granted a request from President Barack Obama‘s campaign to give all voters in the swing state the option of casting their ballot in person during the three days before Election Day.

U.S. District Judge Peter Economus in Columbus issued a preliminary injunction in a case involving a state law that cuts off early voting for most residents on the Friday evening before a Tuesday election.

The judge’s ruling said that he expects Ohio’s elections chief to direct all county elections boards to maintain a specific, consistent schedule on those three days “in keeping with his earlier directive that only by doing so can he ensure that Ohio’s election process is ‘uniform, accessible for all, fair, and secure.'”

Obama’s campaign and Democrats sued the state’s elections chief and attorney general over the legality of the law. They argued that everyone should have the chance to vote on those three days. The law makes an exception for military personnel and Ohio voters living overseas.

Attorneys for the state have said many laws already grant military personnel special voting accommodations, such as requirements for states to send absentee ballots to them 45 days before the election. And they contend local boards need those three days to prepare for the election.

Ohio is among 32 states, plus the District of Columbia, that allow voters to cast an early ballot by mail or in person without having to give a reason.

The Obama campaign and Democrats said a series of legislative changes by state lawmakers arbitrarily eliminated the opportunity for most Ohioans to vote in person on those three days, while giving military or overseas voters the chance to do so.

Economus had pointed out to them during an early hearing that Ohioans can cast ballots by other methods — in person on Election Day or by mail beginning 35 days before the election. Lawyers for the state also noted the multiple ways voters can cast a ballot this fall, including casting an early ballot in person on other days.

Before the law, local boards of elections previously set early voting hours on those three final days. And weekday hours and weekend voting varied among the state’s 88 counties.

Democrats estimated in their lawsuit that 93,000 people voted during the final three-day window before the 2008 election.