The governors of Pennsylvania and New Jersey on Friday authorized the early release of potentially thousands of state prison inmates, in measures aimed at fending off a major coronavirus outbreak behind bars like those seen in other parts of the country.

Govs. Tom Wolf and Phil Murphy each invoked executive powers to establish criteria that would offer some nonviolent offenders a temporary reprieve, placing them under house arrest or parole.

In Pennsylvania, Wolf announced a program that could result in the freeing of up to 1,800 inmates starting Tuesday. Qualified prisoners include nonviolent offenders within nine months of eligibility for parole, inmates 65 or older, pregnant women, and prisoners with chronic health conditions that make them more vulnerable to serious coronavirus complications.

The temporary reprieve does not apply to inmates incarcerated for gun offenses, drug trafficking, and sex crimes. Prisoners who have been denied parole or convicted of a separate offense while incarcerated are not eligible.

Wolf’s executive order said the Department of Corrections will discuss each inmate with the courts, the state Attorney General’s Office, and county district attorney’s offices before granting release. Those chosen will be monitored by parole agents and will have to return to prison to complete their sentences once the state’s coronavirus emergency order ends.

Corrections officials said all inmates will undergo a medical screening prior to release to ensure sick individuals aren’t fanning out across the state.

“We can reduce our nonviolent prison population and leave fewer inmates at risk for contracting COVID-19 while maintaining public safety with this program,” Wolf said in a statement.

Murphy laid out his order along similar lines. Also eligible for release in New Jersey are individuals denied parole in the past year or whose sentences expire within the next three months.

The process will begin over the next few days, Murphy said. The governor’s office offered no estimate on how many inmates might be affected.

“A virus this virulent can spread rapidly in a densely populated prison setting,” said Murphy, “and the needs of public safety and public health must be balanced.”

The orders in both states came within minutes of each other and in response to an increasingly loud chorus of defense lawyers, activists, and some prosecutors seeking more action from the governors.

Public health advocates have said for weeks that prisons, county jails, and detention centers — with their close quarters, limited hygiene, and inability to implement recommended social distancing guidelines — are ideal breeding grounds for a disease that could infect hundreds of inmates and guards and spread to the surrounding community. The New York Times reported this week that the Cook County Jail in Illinois has become the largest hot spot in the United States.

But earlier efforts to thin the state prison population in Pennsylvania and New Jersey had either snarled or not moved quickly enough to blunt the coronavirus’ blow.

Wolf, a Democrat, had hoped to avoid unilaterally granting reprieves by urging lawmakers in Harrisburg to agree upon a framework for releases. But as a plan by the GOP-led legislature that would have released no more than 450 of Pennsylvania’s nearly 45,000 inmates fell apart this week, Wolf said he worried time was running out.

“There’s a premium on speed here.… This virus is unforgiving,” he said. “I communicated and worked [with state House Republicans] as much as I could. But in the absence of the ability to do that, I’m going to be doing this on my own.”

In New Jersey, the state Supreme Court two weeks ago ordered the release of hundreds of inmates from county jails, which unlike prisons house mostly pretrial defendants. But Friday, New Jersey officials announced its first death of a Middlesex County corrections officer — Nelson Perdomo, 44 — who had worked at East Jersey State Prison for 19 years.

One New Jersey prison inmate has already died and at least 129 officers and 20 prisoners have tested positive for the virus, State Corrections Commissioner Marcus Hicks said. More than 1,000 asymptomatic employees and 400 asymptomatic inmates are in medical quarantine due to possible exposure to the coronavirus.

“You can imagine when you’re running a correctional facility, in a correctional setting, that there are unique challenges in trying to implement social distancing,” Hicks said.

Only one Pennsylvania prison — SCI Phoenix in Montgomery County — had reported any infected inmates as of Friday, when Department of Corrections officials announced their 11th positive test there. Nineteen corrections officers, including six at Phoenix, have also become infected, Corrections Secretary John Wetzel said.

Advocates lauded the governors’ actions as a positive first step, but said it must not be the last.

Keir Bradford-Grey, Philadelphia’s chief public defender, said that the criteria outlined by Wolf would only apply to 4% of Pennsylvania’s incarcerated population. And not all eligible inmates have stable homes where they could be placed under house arrest, meaning it’s possible less than 2% of the current prison population would qualify, she estimated.

Reggie Shuford, executive director of the ACLU of Pennsylvania, encouraged Wolf and lawmakers to keep pushing for ways to release more.

“Public health experts say that Pennsylvania is on the verge of bending the curve of outbreak of this pandemic," Shuford said. "If an outbreak were to occur in a Pennsylvania prison or jail, it could threaten to erase the progress we’ve made in the commonwealth.”

Staff writer Justine McDaniel and Angela Couloumbis of Spotlight PA contributed to this article.