(CNN) Republican Ohio Gov. Mike DeWine announced late Monday night that polls will be closed in the state on Tuesday as a result of the coronavirus pandemic.

The order came from Ohio Health Director Dr. Amy Acton, who said she was ordering "the polling locations in the State of Ohio closed on March 17" in order to "avoid the imminent threat with a high probability of widespread exposure to COVID-19 with a significant risk of substantial harm to a large number of the people in the general population, including the elderly and people with weakened immune systems and chronic medical conditions."

Acton said the order "shall take effect immediately and remain in full force and effect until the State of Emergency declared by the governor no longer exists" or she modifies the order.

Early Tuesday morning, Ohio's Supreme Court rejected a challenge to the poll closure by a candidate for a county judgeship.

The late-night change is the latest turn in a confusing saga that played out hours before voters were set to go to the polls in Ohio, and it highlights the depth to which election officials are struggling to balance protecting the public and allowing them to cast ballots.

DeWine earlier on Monday asked a court to move the primary election to June amid the pandemic, only to be denied by a judge later in the day. It's not clear whether the order to close the polls as a health emergency will violate the court's ruling.

"During this time when we face an unprecedented public health crisis, to conduct an election tomorrow would force poll workers and voters to place themselves at a unacceptable health risk of contracting coronavirus," DeWine said in the statement announcing the latest change. "As such, Health Director Dr. Amy Acton will order the polls closed as a health emergency. While the polls will be closed tomorrow, Secretary of State Frank LaRose will seek a remedy through the courts to extend voting options so that every voter who wants to vote will be granted that opportunity."

When asked by CNN's Don Lemon how the health director could make such an order, despite the judge's ruling, Ohio Secretary of State Frank LaRose pointed to the "broad authority" Acton has as the top health official in the state.

"What the health director has is broad authority to protect the health of Ohioans," LaRose said in an interview on "CNN Tonight."

"There's a reason why that was created in law. Difficult decisions have to be made. The question of whether to go on with challenging this and appealing to courts in the middle of the night would create more uncertainty. The governor's decision, I think, was a wise one to create the finality here so that poll workers know we're not going to order them to go to the polls tomorrow morning when it is detrimental to their health."

At least one of the state's major political parties was also prepared to avoid voting on Tuesday, with Jane Timken, chair of the Ohio Republican Party, telling party members that -- based on the order -- no election would take place on Tuesday.

"Governor DeWine just announced that due to COVID-19, Health Director Dr. Amy Acton will issue an order that all polling locations be closed due to a health emergency," Timken said in a statement. "This is a developing situation and we will relay any new and relevant information as soon as we receive it. Based on Dr. Acton's order the primary election will not take place tomorrow."

But some have also expressed concerns about pushing back voting into June. Ohio Democratic Party Chairman David Pepper said on Monday that the party "strongly supports concluding the primary election earlier than June 2" because "extending for that long is highly problematic for any number of reasons, and it is not at all clear that in-person voting will be possible on that date anyway."

The election comes as the spread of the virus has caused a major disruption to American life as government officials work to stem the pandemic. Illinois, Florida and Arizona will also hold their elections Tuesday as planned, and state officials in the three states said after DeWine's initial press conference that there would be no change to their current plans to hold elections on Tuesday.

On Monday, President Donald Trump, as part of new guidelines to fight coronavirus, advised people not to gather in groups of more than 10, and asked people to stay away from bars, restaurants and food courts and to not travel, if possible.

On Sunday, the US Centers for Disease Control and Prevention recommended no gatherings with 50 people or more for the next eight weeks.

DeWine announced Monday afternoon that he was recommending the primary be moved. The governor, though, said he did not have the power to postpone the primary unilaterally.

"It is clear that tomorrow's in person voting does not conform, and cannot conform with these CDC guidelines. We cannot conduct this election tomorrow, the in-person voting for 13 hours tomorrow, and conform to these guidelines," DeWine said.

He added: "We should not be in a situation where the votes of these individuals, who are conflicted, are suppressed. It is therefore my recommendation after talking with the secretary of state, talking with the attorney general, talking with the lieutenant governor, that voting be extended until June 2. That no in-person voting occur today, but rather that in-person voting occur on June 2, but between now and then that absentee ballot voting be permitted."

Louisiana, Georgia and Kentucky have moved their presidential primaries to later in the year because of the spread of coronavirus. And Wyoming Democratic Party Chair Joe Barbuto announced Friday that "the in-person portion" of their state's caucuses were "suspended due to growing concern" over the virus.

DeWine said he made his recommendation because he believes the state "should not force" people to "make this choice" between staying at home and voting.

"This was not a decision that was easily made," DeWine said. "But it is, I believe, the right thing to do."

The spread of the coronavirus has effectively stopped in-person campaigning in the Democratic presidential primary, forcing former Vice President Joe Biden and Vermont Sen. Bernie Sanders to cancel rallies and town halls. It has also had significant implications on down ballot races.

Biden enters Tuesday's elections with substantial momentum and looking to put enough distance between Sanders and him in the delegate count to effectively end the nomination fight. A postponement in Ohio could extend the Democratic primary, however.

President Trump said Monday that he did not advise states to postpone primary elections, calling the delays "unnecessary." The comment came shortly after DeWine announced his recommendation.

"Well, I'd leave that up to the states. It's a big thing, postponing an election," Trump said, adding later, "I think postponing elections is not a very good thing. I think postponing is unnecessary."

State officials who joined DeWine for his news conference said that they were hearing from both election volunteers and voters who told them they were "really scared" to vote because of the impact it could have on their health, with some outright saying they were going to "skip" voting on Tuesday because of those fears.

In a sign of the uncertainty around the novel coronavirus, DeWine said "we don't know" when asked why his administration believes it will be safer to vote in June.

"Safer would have been September, OK," he said. "We have one problem: This is a presidential election year. ... This is the date that seemed as far out as we could push it but within the timeframe."

DeWine, ever since the rise of the novel coronavirus, has taken an aggressive approach to slowing the virus' spread, earning plaudits from Republicans and Democrats alike.

Timken, head of the Ohio Republican Party, said Monday that they "fully support" DeWine's recommendation. And Pepper said in a statement that he supports the "decision regarding in-person voting tomorrow."

Candidates on the ballot in Ohio, like Democrat Kate Schroder in Ohio's first congressional district, also backed the governor.

"Public health comes first," said Schroder, who has a background in public health. "As a candidate, changing the date of the election is an unexpected challenge, but it is nothing compared to the importance of community safety and minimizing lives lost. I wholeheartedly support Governor DeWine's recommendation."

The three other states set to vote on Tuesday -- Arizona, Florida and Illinois -- have said they are moving ahead with their planned elections.

Florida's Secretary of State said Sunday evening that each county's supervisor has been provided with guidance from the CDC and the state department of health to ensure they're keeping voters safe. They've also been provided with information on sanitizing voting machines.

And state officials from Illinois have been encouraging early voting in the face of the coronavirus, with the city of Chicago extending early voting hours through 7 p.m. CT on Monday and Governor J.B. Pritzker encouraging localities to expand early voting hours until Election Day.

"I feel good about the decision to have the election go on tomorrow," Pritzker said on Monday.

And Arizona Secretary of State Katie Hobbs said that while they "understand the apprehension that voters have right now" election officials have "been in consultation with election officials across the state, health experts and leaders from the Democratic party who agree that the election should move forward tomorrow."

"The longer we wait," Hobbs said, "the more difficult and dangerous this will become."

CORRECTION AND UPDATE: An earlier version of this headline and story incorrectly said the Ohio primary would be delayed when a judge had actually denied the request to delay it. Then, Gov. DeWine said late Monday that polls in the state will be closed on Tuesday, and the story was updated to reflect that.