At the conclusion of World War II, the first defendants to testify at the Nuremberg trials were Nazi physicians and public health officials who were interrogated about how and why they conducted horrific experiments on human beings, and mass murder in the name of science and medicine. It’s been convenient to believe that these perpetrators were incompetent, mad or just following orders, but according to medical ethicist Arthur Caplan, “Most of those who participated did so because they believed it was the right thing to do.”

Not only the right thing to do. Now we know it was what many of them were taught to do.

Researchers from Germany and Israel have discovered that the Nazis systematically taught their own version of medical ethics to students throughout Germany, intended not only to justify the regime’s horrors but also to shape future generations of physicians. These findings, published in the Annals of Internal Medicine in April, demonstrate how politics and a society’s prevailing zeitgeist can influence and pervert medical ethics — something we are not immune to, even today.

“The paper was a breakthrough,” Caplan, a professor of bioethics at New York University who reviewed it before publication, told me. “Until this, we didn’t know what the Nazis were teaching in schools.”

Given the medical crimes and immoral conduct of Hitler’s regime, I had assumed that the Nazis weren’t teaching anything at all. How could there possibly be ethical justifications for mass murder, lethal experimentation and racist behavior?

But Florian Bruns of Berlin’s Charite University Medical Center and Tessa Chelouche of the Technion-Israel Institute of Technology, in Haifa, dug through course catalogs and archival sources to discover that the Nazis had devised a code of ethics and turned it into a medical curriculum with textbooks, mandatory classes and approved lecturers.

This curriculum was implemented in 1939 and included lectures on racial hygiene, the science of heredity, population policy and more — subjects suitable for promoting Nazi ideology to medical students. But they went further and created another set of required lectures called Medical Law and Professional Studies, which “focused for the first time on physicians’ moral and legal obligations to their patients as well as to their profession and the state,” Bruns and Chelouche wrote. By the winter semester of 1943–1944, 25 of the 28 faculties teaching medicine in the “Greater German Reich” held obligatory lectures in MLPS.

MLPS was intended to create a new kind of physician, one who would focus less on individual patient care and more on the general welfare of society. Rudolf Ramm, a physician who published a textbook on MLPS in 1942, “blatantly defined the Nazi physician’s ethical obligation as being responsible for ridding society of certain groups: Jewish people, disabled people and any others who were deemed unable to contribute to society,” Bruns and Chelouche wrote.

Ramm advocated the “mercy killing” of the disabled, writing: “These creatures merely vegetate and constitute a serious burden on the national community. They not only reduce the standard of living of the rest of their family members because of the expenses for their care, but also need a healthy person to take care of them throughout their lives.”

You can see through those chilling words how Nazi health officials reinterpreted the Hippocratic Oath to legitimate their genocidal ideology. Exterminating Jews and the disabled, and people with hereditary diseases, and anyone considered a burden was morally acceptable in order to heal the German people.

What do we learn from this? As Caplan has written, the Holocaust differed from other instances of genocide in that it involved the active participation of medicine and science. We knew about the scientific workings of the gas chambers and Josef Mengele’s horrific concentration camp experiments, but now we know that the Nazis intended to inculcate future generations of physicians and health workers with a corrupt version of “ethical” teachings.

“The Nazis played off the rights of the individual against the supposed interests of society on a large scale,” Bruns and Chelouche wrote. “We should remain aware that violating individual rights always damages a society.”

Of course, this was not the first time that the medical profession had drawn up a pretext to violate the rights of a persecuted minority; the notorious Tuskegee Syphilis Study on poor African-American men began in 1932 and lasted for 40 years. But it is stunning that the Nazis went through such monumental attempts to pass along their perverted teachings to what they hoped would be future generations of medical professionals.

As Caplan told me, “The lesson here is to stay alert to what forces might be impinging on our ethics today.”

Jane Eisner is the Forward’s editor-in-chief. Follow her on Twitter, @Jane_Eisner.