Sign up for The Brief, our daily newsletter that keeps readers up to speed on the most essential Texas news.

EL PASO — El Paso County Judge Ricardo Samaniego ordered a two-week shutdown Thursday of nonessential businesses in this border area to help curb the record-breaking rise of COVID-19 cases that have overwhelmed hospitals. But Texas Attorney General Ken Paxton's office swiftly challenged the judge's ability to issue the shutdown, setting up a potential legal battle, and El Paso Mayor Dee Margo said Samaniego never consulted him about that plan.

Samaniego's order comes after Gov. Greg Abbott issued a statewide executive order in September allowing some nonessential businesses to reopen to 75% capacity.

"El Paso County Judge Samaniego has no authority to shut down businesses in El Paso County," Paxton's office said in a tweet. "This is a direct violation of @GovAbbott’s executive order. My office is quickly exploring all legal actions."

The Texas Tribune thanks its sponsors. Become one .

The county judge said at a virtual press conference he believed he was on solid legal ground to issue the latest order, which he acknowledged was a rare move in light of what the rest of the state is doing.

"What I am doing now is not anything that has not been tried, but things that have worked," he said. "We need to build capacity for our hospitals, build capacity to shore up contact tracing, identify hot spots and clusters and locally address the problems."

When asked for comment, a spokesperson for Abbott deferred The Texas Tribune to the tweet from Paxton's office.

For several days, El Paso has seen daily case counts that exceed 1,000 new infections, forcing the judge to install a curfew for residents from 10 p.m. to 5 a.m. Local hospitals announced earlier this week they were asking some patients with illnesses other than COVID-19 to be airlifted to other medical centers to free up bed space. More than 44% of people hospitalized in the El Paso area are being treated for COVID-19.

The judge said Thursday’s move is necessary to save lives.

“The hard truth is that the people that are dying are El Pasoans. They are not in Austin, and I have the responsibility to do everything I can,” he said.

The order does not effect poll workers or voters who have not yet cast ballots during early voting in Texas.

"I call on every single El Pasoan to stay home unless you are working an essential job or accessing essential services, including exercising your right to vote," Samaniego said.

The Texas Tribune thanks its sponsors. Become one .

Samaniego noted that Abbott said during a visit to El Paso earlier this month that local officials had some leeway to shape local ordinances.

"He stated, and I want to clarify, local officials do have levels of flexibility to make sure they are able to contain the spread of COVID-19," Samaniego said. "I am hopeful the governor will recognize this is a short-term remedy."