US Attorney General Bill Barr said Thursday he had instructed federal prisons to free some inmates to lessen the impact of the coronavirus epidemic.

One day after the United Nations human rights chief urged countries to protect people held in overcrowded jails and other enclosed facilities, Barr said he had encouraged US prisons to release qualified inmates.

"I've asked and issued a memorandum just today to the Bureau of Prisons to increase the use of home confinement, based on a number of factors... particularly for those older prisoners who have served substantial parts of their sentences," Barr said.

He said the instruction was focused on prisoners who are not considered dangerous and who may have underlying medical conditions that make them particularly vulnerable to the COVID-19 virus.

"We want to make sure that our institutions don't become petri dishes" for the disease, Barr said.

His instructions apply to the some 170,000 inmates in the US federal prison system, where about a dozen cases of coronavirus have been discovered among prisoners and prison staff.

The directive will favor prisoners over 60 years old who have not been convicted of violent or sexual crimes.

The US federal prison in Terre Haute, Indiana
The US federal prison in Terre Haute, Indiana GETTY IMAGES NORTH AMERICA / SCOTT OLSON

Possibly 2,000 inmates could qualify.

The majority of the 2.2 million people serving prison time in the United States are in state and local institutions.

A number of state governors have come under pressure to free elderly inmates with greater risks of coronavirus infection.

The leaders of California and New Jersey are already moving with similar actions to Barr's.

On Wednesday, the UN High Commissioner for Refugees, Michelle Bachelet, called for governments to ease the pressure on prison populations.

"COVID-19 has begun to strike prisons, jails and immigration detention centres, as well as residential care homes and psychiatric hospitals, and risks rampaging through such institutions' extremely vulnerable populations," Bachelet said in a statement.

Ethiopia announced it would free more than 4,000 prisoners and Afghanistan also plans to let go up to 10,000 detainees.