Some of the worst atrocities of the 20th century were caused by the use of peas. Next month, we will celebrate the 200th birthday of Gregor Mendel. His legacy is not in Augustinian theology but in the field of genetics.

More than 28,000 plants pea were bred in the 19th century by the Augustinian Mendel, who crossed tall plants with wrinkly seeds and white flowers. In the forest of pea plants, he found that the differences between the offspring and the grown ups were predictable. The rules of inheritance were found by the man. The way the units flowed through the genealogy followed mathematical patterns.

Every secondary school teaches these rules as a core part of understanding fundamental biology. The history is a good one. At the same time as Darwin was working on his greatest idea, Mendel was publishing his work. The genius friar was ignored until both men were dead, only to be rediscovered at the beginning of the new century.

The course of the 20th century was shaped by a lesser known story. Eugenics is the root of genetics. The principles of population control have been in place for a long time. Francis Galton, Darwin's half-cousin, added a scientific and statistical sheen to the deliberate sculpting of society in the Victorian era. One of the most dangerous ideas of the 20th century was the political ideology that co-opted the very new and immature science of evolution.

All new scientific discoveries exist within the culture into which they are born, and are always susceptible to abuse

The UK was close to having compulsory sterilisation of "undesirables", something that the Asquith government championed, but which the MP Josiah Wedgwood resisted. Over the course of a century, an estimated 80,000 people were sterilised by the state in the US in the name of purification.

The policies of American Eugenics were faithfully married to the laws of the man. The Eugenics Record Office in Cold Spring Harbor, New York, was set up in 1910 to promote a racist, ableist ideology and to harvest the American's genes. Davenport thought they could purify the American people by establishing the inheritance of desirable and undesirable qualities. The threat of great replacement theory is that undesirable people will spread inferior genes and the ruling classes will be erased.

The US eugenics movement was a big part of it, and Davenport latched on to the idea of Mendelian inheritance to explain all sorts of human quirks. He wrote in 1910 that heredity stands as the one great hope of the human race, and like all of the enthusiastic Eugenicists, he attributed the inheritance of these complex traits to genes. Despite what we still teach in schools, we have the first genetic studies of Huntington's disease, which strictly obeys a Mendelian inheritance.

Deborah Kallikak, the young woman whose family history Henry Goddard fabricated to back up his theories.

Deborah Kallikak, the young woman whose family history Henry Goddard fabricated to back up his theories. Photograph: Macmillan & Co. Publishing 1912

There is one tale from this era that stands out. The girl with the name Deborah Kallikak had been studied by the psychologist since she was eight years old. She was described as a high-grade feeble-minded person, the moron, the delinquent, and the kind of girl that fills our reformatories. She was able to trace the origin of her troubles by getting a detailed picture of the Kallikaks. He said that Martin Kallikak stopped off on his way home from the war of independence to have a barmaidimpregnated with his wife's consent.

In The Kallikak Family: A Study in the Heredity of Feeble- Mindedness, he traced a perfect pattern of inheritance for good and bad. His bastard offspring produced a clan of criminals and disabled people, eventually ending with Deborah. The feeble-mindedness of the Kallikaks was caused by a single unit of defects in the genes.

A modern geneticist will not approve of this. The first is the term "feeble-minded", which was a vague, pseudo-psychiatric bucket diagnosis that we assume included a wide range of today's clinical conditions. We might reject his conclusion that complex psychiatric disorders are often influenced by the environment because they rarely have a single genetic root. The outcome of a trait will not be determined by the presence of a particular genes.

The human genome is the most complex in the known universe. The barmaid never existed, so there is no need for a modern analysis.

The Kallikak family tree, from a 1955 textbook.

The Kallikak family tree, from a 1955 textbook. Photograph: Macmillan & Co Publishing 1912

Men of medicine, the law and the clergy were part of Martin Kallikak's family. The illegitimate branch was invented by Goddard, who wrongly identified an unrelated man and dreamed up his barmaid mother. The photos in the book show some of the children with facial characteristics that are associated with foetal alcohol syndrome, a condition that is entirely determined not by genetic inheritance, but by exposure to high levels of alcohol in pregnant women. The case study was a model of human inheritance and a justification for sterilisation until the 1950s. The myth of American Eugenics was created by the Kallikaks.

The German eugenics movement began at the beginning of the 20th century. The national eugenics ideology for purifying the Nordic stock of German people was a core part of the rise of the third Reich. The Law for the Prevention of Genetically Diseased Offspring was the first piece of legislation to be passed after Hitler took power. Most of these conditions are not straightforwardly Mendelian, and in one case where it is, Huntington's, the disease can take effect after a woman's reproductive age. Its inheritance was unaffected by sterilisation.

The development of the Nazis' eugenics programmes was supported intellectually and financially by the American Eugenicists. A short film called Das Erbe was released in 1935. A scientist looks at a couple of beetles. She consults her professor who explains the Darwinian struggles for life and shows her a film of a cat. She exclaimed, to roar of laughter, that animals pursue their own racial policies.

Nature purges the weak and so must we.

A still from the 1935 Nazi propaganda film Das Erbe, which conflates natural selection and eugenics.

A still from the 1935 Nazi propaganda film Das Erbe, which conflates natural selection and eugenics. Photograph: YouTube/ORF2

The film shows a hunting dog that is similar to the one you might find at the club today. There is an animation of the family tree of the Kallikaks with one side being genetically healthy and the other being hereditarily flawed. On the sick side, the positions of all of the deviants show the flow of undesirable people through the generations. Das Erbe was a film to promote public acceptance of the Nazi eugenics laws, and what follows the entirely fictional Kallikak family tree is its claimed legacy: shock images of seriously disabled people in sanatoriums, followed by healthy marchers, and a message from Hitler. A large number of people were sterized under this policy. In just 20 years, a scientific lie had become a pillar of genocide.

Science will always be politicized The authority of science is used by people to justify their beliefs. The pattern is the same today with new genetics. After the school shootings in Buffalo in May, there was heated discussion in genetics communities as the murderer had cited specific academic work in his deranged manifesto, as well as legitimate papers on the genetics of intelligence and the genetic basis of Jewish ancestry.

Science wants to rise above the biases of politics and psychology to be a political science. New scientific discoveries are always vulnerable to abuse in the culture they are born in. It doesn't mean that we should censor academic research or that we should accept that our scientific efforts are imperfect.

We should know what happened to us. A version of genetics that is easy to understand is taught by us. The laws in biology have a tendency to be set by qualifications and complexity. Evolution preserves what works, not what is easy. In the US, in Nazi Germany, and in dozens of other countries, there is a science which is easy to co-opt and is marshalled into a racist, fascist ideology. It's important for us to know our history so that we don't end up repeating it.

  • Control: The Dark History and Troubling Present of Eugenics is a book. Go to guardianbookshop.com to order your copy. Delivery charges can be applied.