With the reopening of schools just weeks away, Maryland’s governor and leaders of the state’s largest jurisdiction clashed Monday over whether private schools should be able to bring students back on campus for in-person learning.

Three days after Montgomery County’s top public health official said that private and parochial schools would have to stick to online teaching until at least Oct. 1, Gov. Larry Hogan on Monday sought to invalidate the county directive.

Hogan (R) sharply rebuked Montgomery County for barring in-person instruction, saying local officials went too far in exercising the leeway he gave them to shut down businesses, schools and other activities amid the pandemic.

In amending a previous executive order, Hogan said school systems and private schools should have sole authority to determine when and how to safely reopen; local health officials may shut down schools only on a case-by-case basis for health reasons.

One after another in recent weeks, public school systems nationally and in the Washington region — including Montgomery County — have announced they will start their school years with remote learning, as coronavirus cases continue to rise. The decisions have come despite pressure from the Trump administration to fully reopen campuses.

Private schools have explored options including hybrid approaches that combine distance education with in-person learning. Many schools were still finalizing plans, but many families expected some degree of on-campus instruction in the fall.

Politics have infused the debate over school reopenings in Maryland and across the country. While Hogan has been willing to counter the president’s message on dealing with the pandemic, the governor has also long been an advocate of parochial schools. A lifelong Catholic who attended a private high school, one of Hogan’s signature education policies is a voucher program, known as BOOST, that gives scholarships to private school students.

On Monday, Hogan said private schools “deserve the same opportunity and flexibility to make reopening decisions” that public school systems have enjoyed, adding that he intends to keep a “flexible, community-based approach that follows science, not politics.”

Montgomery County officials did not address Hogan’s action directly on Monday.

County Executive Marc Elrich (D) tweeted Monday afternoon that the decision to restrict non-public schools from in-person instruction “was made with one concern in mind — protecting the public health of our residents. It was not an easy decision. As we have done throughout this pandemic, we used data and science to guide us — not politics.”

Hogan’s emergency action was announced while Montgomery County officials were meeting with reporters to explain Friday’s decision by Health Officer Travis Gayles to keep private and parochial schools from bringing students on campus for in-person learning until at least Oct. 1.

Gayles was one of the first health officials in the United States to require that private schools shutter this fall.

Gayles and others cited the county’s coronavirus numbers, pointing out that when Hogan first closed schools statewide in March, Montgomery was averaging four new cases a day. Its latest numbers are around 80 cases a day, they said.

While there is little doubt about the value of in-person instruction, “we are operating in a pandemic situation where we are fighting a virus that is hitting our communities hard and where we continue to see increases in cases across the country, across the state and across the region,” Gayles said.

Reaction to Hogan’s move was cheered by families who were counting on at least a partial return to in-person learning. Still, others took a wait-and-see approach, sensing the issue was not fully settled.

Ally Bloom, a mother of three in McLean who has two children in private schools in Montgomery County, said the family was thrilled when a friend texted news of the governor’s order Monday.

Her son, a rising junior at Georgetown Preparatory School, jumped up and down, she said.

“We’re ecstatic,” she said. “My son can’t wait to get back to school.”

The school reopening plan would have brought students back to the North Bethesda campus for in-person learning five days a week, while also offering the option for online learning to those who preferred it, according to a spokesman.

The school issued a statement Monday saying it was reviewing the Montgomery County directive and Hogan’s statements to decide how to proceed.

Bloom said the county’s decision on Friday night had caught the family and others by surprise. In a matter of two days, more than 3,700 people joined a Facebook page focused on the issue.

Schools and families had believed they could open if they were able to follow guidance from the Centers for Disease Control and Prevention and other safety protocols, Bloom said.

“Schools had made significant financial investments, and had medical advisory boards and pages and pages of plans,” said Bloom, an emergency-room physician who has been on the front lines of the pandemic and said she is comfortable with her children’s return to campus, so long as there are adequate safety measures.

Kevin O’Rourke, a parent in Germantown and administrator of the Facebook page “Open Montgomery County, MD Private Schools,” said parents welcomed the governor’s decision but what happens next is unclear.

“The feeling is that we have won the day but who knows what tomorrow will bring,” he said.

Private schools in Montgomery are diverse, with some charging tuition as high as $48,000 or more, while others run less than $10,000.

The Archdiocese of Washington issued a statement Monday, saying it was grateful to learn of Hogan’s order and would “continue to work with our educators and communities to ensure the safe reopening of the schools.”

In other jurisdictions, the issue has played out in varied ways.

D.C. Mayor Muriel E. Bowser (D) announced Thursday that the city’s public school system would start the academic year entirely online. But the mayor said her decision did not preclude public charter or private schools from starting the school year in person or with a hybrid model.

In Prince George’s County — also hit hard by the pandemic — health officials said Monday that they were working with private schools to review the safety plans of those considering in-person instruction. “Once plans have been reviewed, we will make the determination if the Health Department needs to make a decision regarding in-school learning for private schools this fall,” a county health spokeswoman said in an email.

Private schools affected by the Montgomery County directive and governor’s order include St. Andrew’s Episcopal School, the private school in Potomac attended by Barron Trump, the president’s youngest child.

Parents of Montgomery County private school students filed a federal lawsuit Monday asking a judge to overturn the county health director’s order, which attorney Tim Maloney said still stands and could be enforced unless the county rescinds it — or a court invalidates it.

Maloney, a former state lawmaker, represents six sets of parents with children enrolled at five different private schools. He also represents two additional private schools.

The lawsuit said the order impacts 23,000 Montgomery County students, and it alleges it would also shut down scores of non-public nursery schools that offer child care for children ages 2 to 4.

The lawsuit alleges the health director’s order not only oversteps the power granted by the governor under a revised executive order, it also discriminates against religious and private schools, runs counter to guidance from state education officials, and is not merited by health conditions in the county.

Some families voiced relief upon hearing of Monday’s seeming turnaround.

Shortly after Hogan issued the order Monday, Christina Marmor’s phone exploded with notifications from four different group chats filled with parents at Holy Redeemer Catholic School in Kensington, which educates students in prekindergarten to eighth grade. Marmor stopped en route to Target and scanned the messages.

“Thank you, Jesus!” she said aloud.

Her first thought was for her eldest son, a middle-schooler at Holy Redeemer who is deaf and uses cochlear implants. Online learning last semester had been a disaster for the boy: Although he reads lips well, Marmor said, her son found it impossible to keep up when many pixelated faces began speaking at once during Zoom class.

So she was thrilled when Holy Redeemer debuted a plan that allowed parents to choose between all-virtual, fully in-person and a hybrid model of learning. She immediately picked the face-to-face option, confident in the detailed safety plans the school had worked all summer to debut — the socially distant seating, the fact that every classroom has its own private exit to the outdoors.

The order last week from Montgomery County health officials forcing private schools to start the fall online-only sent Marmor into spiraling anxiety and concern for her son.

After a tense weekend, Hogan’s counter-order brought sudden sunshine, even on an overcast day.

“We are really happy that he has taken a stand for us parents who have chosen to send their children to private schools,” Marmor said. “I just want my son to be able to access the education he deserves.”

Perry Stein contributed to this report.