In 19000, Austrian physician Karl Landsteiner discovered there are three blood groups A, B, and O. It was a huge find and he won a Nobel Prize in Physiology or Medicine for it in 1930. A few years later researchers would discover the AB group.

There are four main blood types. Blood type A is the most ancient, and existed before the human species evolved from its hominid ancestors. Type B is thought to have originated some 3.5 million years ago, from a genetic mutation that modified one of the sugars that sit on the surface of red blood cells. Starting about 2.5 million years ago, mutations occurred that rendered that sugar gene inactive, creating type O, which has neither the A or B version of the sugar. And then there is AB, which is covered with both A and B sugars.

But incompatibility is not part of the reason humans have blood types, says Harvey Klein, chief of transfusion medicine at the National Institutes of Health Clinical Center. “Blood transfusion is a recent phenomenon (hundreds of years, not millions), and therefore had nothing to do with the evolution of blood groups,” he said.

The evolutionary cause, or at least one of them, appears to be disease. For example, malaria appears to be the main selective force behind type O, according to Christine Cserti-Gazdewich, a hematologist at Toronto General Hospital. Type O is more prevalent in Africa and other parts of the world that have high burdens of malaria, suggesting that blood type carries some sort of evolutionary advantage.