After the second world war, US scientists and doctors carried out a research programme of striking ambition. More than 1,000 people, including at least 100 children, were deliberately exposed to the disease.

Most of the people who were subjected to this experimentation had no idea what was happening to them. Many were poor and uneducated and came from prisons, asylums and orphanages. There was a disproportionate number of black people.

I don't know of any problematic infectious disease studies that involved a wider array of devalued and stigmatised groups.

The subjects included prison inmates, draft objectors who were already derided as yellowbellies, and adults with intellectual impairments.

Hepatitis B virus particles under the microscope.

Hepatitis B virus particles under the microscope. Photograph: Erskine Palmer/AP

The fact that the mass violation of human rights continued for so long is extraordinary. In a society that believed itself to be untainted by crimes that had typified its Nazi opponents, how could these decades-long trials have been allowed?

Halpern is at pains to find rational answers to the questions, but in the end it is difficult to find a sense of coherence in the motives of the scientists involved. The creation of a military-biomedical elite that decided the need to control disease and defend the nation justified actions that resulted in the deaths of innocent people. They were largely supported by the press.

Recruits ingested milkshakes made from infected excrement mixed into chocolate milk 

There are three different virus strains that cause the disease, A, B and C.

There was an outbreak among US soldiers in 1942. This was traced back to a contaminated yellow fever vaccine. The scientists decided to use sullied samples to get a better idea of the disease.

Over the decades, these studies were expanded with researchers persuading their recruits to eat samples of the bad stuff. Halpern writes that scientists created a pool of hepatitis carriers by mixing human feces with chocolate milk. It's not clear how many people died as a result of the US programme. There would have been deaths.

Halpern acknowledges that not all of the dangers were known when the programme began. Even though they were obvious, no one bothered to try to find out who had died because of scientists actions or who had developed liver disease.

The programme was brought down by 1960s activism. Young doctors began to question the programme after campaigns against the Vietnam war and for minority rights. The programme ended in 1972.

Halpern's story is chilling, told with clarity and commendable brevity, and it is of crucial relevance today. The emergence of Covid-19 spurred calls for the creation of experiments in which volunteers would be exposed to the disease in order to understand how it spreads and behaves. Some of the studies are continuing.

She warns that the long-term consequences of infections are unknown and are not likely to be fully understood for years.

Yale University Press published Dangerous Medicine by Halpern. You can support the Guardian and Observer by ordering your copy at guardianbookshop.com. Delivery charges may apply.