THE FIRST person to die from covid-19 on Rikers Island, a jail in New York City, exhaled his last breath on April 5th. The victim was a 53-year-old man, Michael Tyson, who died at a local hospital. He had been incarcerated for a technical, non-criminal parole violation and almost certainly caught the disease inside. Over the past month at least, the island has become a reservoir of the coronavirus. At least 362 people have been confirmed to have been infected, out of a total inmate population of 3,974. This is six times higher than the infection rate in the city as a whole. At least six prison staff across New York have died.

Preventing the spread of covid-19 is difficult everywhere. But prisons are among the hardest places to protect. Worldwide there are 11m behind bars, according to Penal Reform International, a pressure group. That is the highest figure ever. In most rich countries and almost all poor ones, cells are overcrowded, people come and go frequently, and effective social distancing is all but impossible. The sorts of people who end up in prison are more likely to have other problems, such as drug or alcohol addictions, or difficult family situations, which might make them more vulnerable to the virus or more likely to spread it to others. Inmates are not necessarily co-operative. And prisons cannot be shut down in the way that other places where people are confined in tight spaces can be. The risk is that if the virus enters prisons, it will prove impossible to control. Not only might it kill a lot of inmates and guards, it could also add to the pressure on health systems and spread out into the rest of the population.

In America, which has the world’s biggest prison population, there are particular risks. Between 2000 and 2016, the share of people in prison aged over 55 tripled to 12%, or more than 150,000 people. State prisons now contain more of them than they have inmates aged between 18 and 24. Many people are sent to jail for short periods—at Rikers, a third stay fewer than four days—which means that they risk picking up the virus and then taking it out again. Though visits from relatives have been banned in most places, prisoners still need to see lawyers. A defence lawyer in a large east-coast city with clients in a big jail says that at the end of March, nobody—including quarantined inmates suspected of carrying the virus—was wearing masks. Nor was anyone checking people’s temperature when she visited her clients. A mental-health clinician at a large west-coast jail says that staff and inmates alike have been reluctant to wear masks, and that keeping the jail clean has been left to inmates short on cleaning supplies.

In poorer countries, conditions make those even in American jails look good. In Latin America, the region with the most prisoners after America and China, inmates often rely for survival on family members bringing them extra food. There is often no running water. In El Salvador, inmates take turns sleeping in hammocks. In Brazil, four out of ten prisons have no doctor or nurse on site; more than 10,000 prisoners had tuberculosis last year. With family visits suspended to try to reduce the risk of the virus spreading, many people lack soap and toilet paper, since governments often do not provide it. “It’s a ticking time-bomb,” says José Miguel Vivanco of Human Rights Watch, a pressure group based in New York.

Poor conditions, when compounded with the virus, can generate unrest. On April 11th in Indonesia inmates in a prison in Manado, on the island of Sulawesi, rioted and set fire to buildings in response to rumours that a guard was infected and might have brought the virus into the facility. There have also been prison riots in much of Latin America, including Colombia, Venezuela, Brazil, Argentina and Peru. Dozens have been killed. The unrest is not confined to the developing world. A riot in early March in Italy, after the authorities put controls on family visits, left 12 inmates dead. Many of them overdosed on drugs stolen from the medical room, according to the justice ministry. Another 16 prisoners escaped.

One way in which prisons can be improved is to reduce the numbers inside. If all prisoners were dangerous potential murderers, that would be difficult. But the reality is that in much of the world, people who are not much danger to others are locked up. In America 631,000 prisoners, roughly a third of the total incarcerated, are awaiting trial or serving short sentences for things like probation violations. In parts of Latin America, including Bolivia and Haiti, over two-thirds of prisoners are awaiting trial. Many of those convicted and sentenced committed non-violent drug offences.

The first country to try mass prison releases in response to the virus was Iran. On March 3rd it released some 55,000 prisoners to reduce overcrowding. Over the past few weeks it has been followed across the world. By April 6th New York City had released around 1,500 people from city jails, to reduce overcrowding, including all of those thought to be most at risk of death or serious illness if they caught the virus. Prisoners have been released early or not locked up to begin with in countries from Brazil to Britain. Even Kenya, where there are still just 200 confirmed cases of the virus, has released almost 5,000 inmates.

But releasing prisoners is not always popular, even in places where many people are locked up for fairly trivial offences. In Brazil the justice minister, Sergio Moro, has argued that prisoners are not threatened by the virus and should not be released. Instead, hundreds of prisoners in São Paulo are being transported to and from factories each day to make masks for the government. In Louisiana, the American state with the highest incarceration rate, prosecutors in New Orleans have argued for keeping people in jail so that they do not spread the virus elsewhere.

Even when the political will is there to release prisoners, that does not always come to pass. In Britain, where the government has promised to release around 4,000 inmates who are vulnerable (eg, pregnant women) or near the end of their sentences, ministers are insisting they go through a risk-assessment first and then be tagged. Frances Crook, head of the Howard League, a penal-reform charity, says she has heard of only a handful of releases, despite government promises, even though the virus is spreading through prisons already. In New York City, absurdly, some people have been detained for breaking social-distancing rules. Authorities in El Salvador have locked up more than 2,000 people for violating quarantine orders, confining them in ad hoc "containment centres" for days or weeks, 20 to a room.

Releasing prisoners might reduce overcrowding inside, but if the virus has already spread, it risks creating new problems. Prisoners tend to be poor, and may not have anywhere to go. Some are homeless, or have no fixed address. Angel Rodriguez, who directs Avenues for Justice, a New York-based non-profit group that works with at-risk youth, says one of his clients entered Rikers disease-free, but had contracted covid-19 by the time he was due for release. Since he lives with his 80-year-old grandmother, who has respiratory problems, his release was delayed while they worked out where to send him.

Perhaps the biggest risk, though, is that nothing happens. Fábio Jabá, president of the São Paulo prison guards’ union, says that his members are buying their own masks and gloves; many have not been supplied with anything. “We’re improvising” to isolate prisoners with symptoms, says one guard. Despite the union’s demands, some prison workers over the age of 60 have not been allowed to go on preventative leave, even though dozens of guards have been sent home with symptoms of the virus. In America, “most states are doing nothing,” says Alan Mills, who directs the Uptown People’s Law Center in Chicago, a legal clinic.

Keeping covid-19 out of prisons was always going to be hard for governments, in both rich and poor worlds. After all, if authorities struggle to keep out drugs, mobile phones and other contraband, how can they hope to control an unseen virus? But the disaster that seems likely to unfold in prisons in much of the world—if it is not already under way—should not be inevitable. Countries such as America and Brazil rely too heavily on incarceration to deal with people who break the law. Because so many people are locked up, conditions are miserable. While a global pandemic spreads, it may be difficult to come up with alternatives to locking people up; but perhaps the catastrophe will at least show the importance of trying.