(CBSDFW.COM/CNN) — Hospitals in at least two Texas counties were at full capacity heading into the July 4 holiday weekend, leading county judges to urge residents to shelter in place.

Judges in Starr and Hidalgo counties sent out emergency alerts Friday, warning residents that local hospitals in the Rio Grande Valley were at capacity.

Judge Eloy Vera said there have been 18 deaths in Starr County due to COVID-19 and two severely ill patients had to be flown out of the area for treatment. One of the patients was taken to San Antonio and the other to Dallas, the judge said in the post on Facebook.

“The local and valley hospitals are at full capacity and have no more beds available. I urge all of our residents to please shelter-in-place, wear face coverings, practice social distancing and AVOID GATHERINGS,” he wrote.

Vera issued a public safety alert announcing a “Level 1 Severe” threat due to the virus spreading rapidly across the county.

In neighboring Hidalgo County, Judge Richard Cortez mirrored the warning.

In a public safety alert posted on Twitter, he also announced hospitals were at capacity and asked residents to shelter in place, avoid large gatherings, wear face coverings and practice social distancing.

In the post, Cortez asked residents to celebrate the Fourth of July “responsibly,” and to “Conserve resources; ONLY call 911 if absolutely necessary.”

On Thursday, Gov. Greg Abbott issued a statewide face mask requirement for counties with over 20 confirmed cases of COVID-19 as the state sees a surge in daily cases. Last week, he also ordered bars to close for the second time during the pandemic and restaurants to roll back to a 50% limited capacity, down from 75%.

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. CNN Wire contributed to this report. The-CNN-Wire™ & © 2020 Cable News Network, Inc., a Time Warner Company contributed to this report. All rights reserved.)