For much of the 20th century in America, a little-known but widespread government program locked people up without trials simply for having sexually transmitted infections—and then forced them to undergo dangerous, poisonous “treatments.”

If they were women, that is.

Take, for example, the nearly two dozen women rounded up by authorities on a single day in Sacramento, California in 1919. Margaret Hennessey was one of them, apprehended while walking with her sister to the meat market. It was Tuesday, February 25, a clear winter morning with a gentle wind and temperatures rising to the 40s or 50s. Hennessey—who lived in Richmond, California with her husband, H.J., a Standard Oil foreman—had been staying in town, recovering from influenza at the home of her sister, known from press reports only as Mrs. M. Bradich. As the two women walked to the market, they were approached by an Officer Ryan and other members of Sacramento’s “morals squad”—a unit formed that very morning, tasked with cleansing the city of vice and immorality. The police told the two lone women they were under arrest as “suspicious characters.”

Mrs. Hennessey tried to explain who she was and what she was doing in Sacramento. She offered to show the officers identification. She told the officers her 6-year-old son was attending school in a local convent, and if they arrested her, someone would have to care for him. The officers, Hennessey later told the press, “paid no heed, but took my sister and I to the hospital.” The morals squad delivered Hennessey and Bradich to the “Canary Cottage,” as the city’s isolation hospital was known. There, a doctor probed and prodded the two women’s genitalia, examining them for sexually transmitted infections (STIs). “At the hospital I was forced to submit to an examination just as if I was one of the most degraded women in the world. I want to say I have never been so humiliated in my life,” Mrs. Hennessey told the local newspaper. “My reputation means something to me and I am going to defend it.”

Margaret Hennessey’s experience was far from unusual. She had been detained under a program she likely had never heard of: the “American Plan.” From the 1910s through the 1950s, and in some places into the 1960s and 1970s, tens of thousands—perhaps hundreds of thousands—of American women were detained and forcibly examined for STIs. The program was modeled after similar ones in Europe, under which authorities stalked “suspicious” women, arresting, testing and imprisoning them.

READ MORE: When American Lawmakers Took a Page from the Nazi Playbook

If the women tested positive, U.S. officials locked them away in penal institutions with no due process. While many records of the program have since been lost or destroyed, women’s forced internment could range from a few days to many months. Inside these institutions, records show, the women were often injected with mercury and forced to ingest arsenic-based drugs, the most common treatments for syphilis in the early part of the century. If they misbehaved, or if they failed to show “proper” ladylike deference, these women could be beaten, doused with cold water, thrown into solitary confinement—or even sterilized.

READ MORE: 7 of the Most Outrageous Medical Treatments in History

A poster created by the American Social Hygiene Association warning soldiers of the dangers of prostitutes and STIs. Corbis/Getty Images

Blamed for infecting the troops

The American Plan began during World War I, as the result of a federal push to prevent soldiers and sailors from contracting STIs. In 1917, federal officials were horrified to learn that a huge percentage of men in the military (some erroneously estimated one in three) were infected with syphilis or gonorrhea. Suddenly these diseases presented not just a health threat—but a national security threat as well. So officials passed a federal law that outlawed sex work within a five-mile “moral zone” of every military training camp in the country. When they learned that most infected soldiers and sailors actually contracted their STIs back in their hometowns, they worked to expand this prohibition to cover the entire nation. And when they discovered that most of the women who supposedly infected the men weren’t professional prostitutes, they expanded the program even further.

So, beginning in 1918, federal officials began pushing every state in the nation to pass a “model law,” which enabled officials to forcibly examine any person “reasonably suspected” of having an STI. Under this statute, those who tested positive for an STI could be held in detention for as long as it took to render him or her noninfectious. (On paper, the law was gender-neutral; in practice, it almost exclusively focused on regulating women and their bodies.)

READ MORE: How Ireland Turned 'Fallen Women' into Slaves

The Plan enjoyed complicity, if not outright support, in high places. New York Mayor Fiorello La Guardia gave speeches lauding the Plan; then-California Governor Earl Warren personally spearheaded its enforcement in his state. In 1918, the attorney general personally sent a letter to every U.S. attorney in the country, assuring them this law was constitutional; he also sent a letter to every U.S. district judge, urging them not to interfere with its enforcement. During World War II, the American Civil Liberties Union not only failed to oppose the Plan; its founder, Roger Baldwin, sent a memorandum encouraging its local branches to cooperate with officials enforcing it.

Governors and state legislatures responded to the federal government’s “model law” with enthusiasm. STIs were a hated epidemic, and sex workers, often incorrectly blamed for spreading most STIs, served as popular scapegoats. By 1921, every state in the union, as well as hundreds of municipalities, had one of these statutes on their books. Cities and states enforced these laws, off and on, for the next half-century.

READ MORE: Why Many Married Women Were Banned from Working During the Great Depression

The Sacramento sweep

One such city was Sacramento. Margaret Hennessey and her sister were not the only women arrested that day in 1919; Officer Ryan and the rest of the morals squad had had a busy morning. According to city police records, at about 9:25 a.m., they had arrested a Mrs. M. Sodfreid on “reasonable suspicion” of having an STI. Forty minutes later, they had arrested another woman, Lena Roserene, on the same charge. Then followed identical arrests of women recorded only as Mrs. J.S. Smith, Mrs. Butterworth and Mrs. R. Nichols. Hennessey and Bradich were Ryan’s fifth and sixth STI arrests of the morning. It was a sweep. In all, the morals squad arrested 22 women on February 25, all for the crime of suspicion of STIs. But because Margaret Hennessey alone of these women gave a statement to the newspapers, it is her story that exemplifies the rest.

The STI examinations showed that neither Hennessey nor Bradich had an STI, and officers released them at about 8:00 pm, with orders to appear for court the next morning. At 9:30 a.m., Hennessey stormed into court—ready, she declared to the Sacramento Bee, to “defend myself,” but “I would have no chance.” She was informed the charges had been dismissed. Nonetheless, the arrest left a mark. “I dare not venture on the streets,” she told the Bee later that day, “for fear I will be arrested again.”

In fact, of the 22 women arrested for suspicion of STIs, 16 were released later that day, including Hennessey and Bradich. Six were held overnight, not allowed to speak with or contact anyone. In the end, only one of the 22 women tested positive for STIs. “In other words,” the Bee reported, “out of twenty-two suspects subjected to an examination, the police were justified in arresting but one woman.”

A government poster made during World War II. U.S. National Library of Medicine

Women could be detained for almost any reason

Actually, the police were justified in none of these arrests. It is clear to modern observers that the American Plan was a stunningly sexist program, and one that made no sense from a public-health perspective. Nearly every person examined and locked up under these laws was a woman. And the vague standard of “reasonable suspicion” enabled officials to pretty much detain any woman they wanted. Records exist in archives that document women being detained and examined for sitting at a restaurant alone; for changing jobs; for being with a man; for walking down a street in a way a male official found suspicious; and, often, for no reason at all.

READ MORE: The Scandalous Sex Parties that Made Americans Hate Flappers

Many women were also detained if they refused to have sex with police or health officers, contemporaneous exposés reveal. In the late 1940s, San Francisco police officers sometimes threatened to have women “vagged”—vaginally examined—if they didn’t accede to sexual demands. Women of color and immigrant women, in particular, were targeted—and subjected to a higher degree of abuse once they were locked up.

READ MORE: The First Birth Control Pill Used Puerto Rican Women as Guinea Pigs

Enforcement of the American Plan ended by the 1970s, amid the rise of the Civil Rights Movement, the women’s lib movement and the sex-workers-rights movement. It had lasted in many places for half a century; but today, half a century later, few people have ever heard of it. Even fewer are aware that the American Plan laws—the ones passed in the late 1910s, enabling officials to examine people merely “reasonably suspected” of having STIs—are still on the books, in some form, in every state in the nation. Some of these laws have been altered or amended, and some have been absorbed into broader public-health statutes, but each state still has the power to examine “reasonably suspected” people and isolate the infected ones, if health officials deem such isolation necessary.

Scott W. Stern is the author of The Trials of Nina McCall: Sex, Surveillance, and the Decades-Long Government Plan to Imprison "Promiscuous" Women.

History Reads features the work of renowned historians and authors.