A federal judge on Thursday blocked Ohio’s cuts to early voting and ordered the state to establish additional polling days before November’s elections, saying the reductions would disproportionately harm the poor and members of minority groups.

The preliminary injunction issued by Judge Peter C. Economus was a setback for Gov. John R. Kasich, a Republican and vocal proponent of the measures, and could affect the upcoming elections in Ohio, a closely contested swing state.

Judge Economus’s ruling directed Ohio to restore early voting during evenings and on at least two Sundays, and to reinstate Golden Week, the first week of early voting in which many African-American churches organize congregants to register and vote on the same day. Mr. Kasich and his supporters have said the measures were needed to reduce fraud, save money and create uniformity of practice across the state, and that the four-week early voting period allowed sufficient time for people to cast ballots.

A spokesman for the state attorney general, Mike DeWine, said the state would review the ruling before deciding whether to appeal.