Here are two recent stories about viruses. They started out alike and ended up very differently.

In October, a woman in Guinea died of Ebola, leaving behind two daughters, one of the two years old, the other five. A relative named Aminata Gueye Tamboura took the orphaned children back to her home in northwest Mali–a 700-mile journey. Tamboura didn’t know it then, but the younger girl, named Fanta Conde, was infected with Ebola as well. For three days, they traveled on buses and in taxis as Fanta grew ill, developing a scorching fever and a perpetual nosebleed. Soon after arriving in Mali, she died.

Yet Tamboura never became infected with Ebola. Nor did Fanta’s sister or her uncle, who also made the trip. Nor did anyone else who shared the buses and taxis with Fanta, or who encountered Fanta elsewhere on her doomed journey. After Fanta’s death, the entire country of Mali braced for a devastating outbreak. But the outbreak never came.

The other story began in December. Someone–we don’t know who–paid a visit to Disneyland in California. That person, who we’ll call Patient Zero, was infected with the measles virus. But Patient Zero probably didn’t realize that he or she was incubating it, because the obvious symptoms, such as a rash and a high fever, wouldn’t emerge for several days. Strolling around Disneyland, Patient Zero cast off the measles virus in all directions, infecting dozens of people. Those people later developed measles, and may have spread the virus to others. By the end of January, the Disneyland outbreak had reached 94 cases, and that number is certain to rise higher.

These two stories show just how different viruses can be. For all the fear that Ebola can inspire, it’s a pretty bad transmitter. Measles, on the other hand, is among the most contagious viruses on Earth. There’s no single secret to measles’s power of contagion. Its adaptations for spreading are sprinkled across its whole life cycle.

While the biology of measles has only come into focus in the past few years, physicians have long been aware of its contagiousness. In 1846, a Danish doctor named Peter Panum recorded the first detailed account of a measles outbreak during his stay on the Faroe Islands, located between Scotland and Iceland. The disease leaped from one village to another. Out of the blue, someone would develop a blotchy pink rash that would spread across the entire body. A fever would ignite. “The patients were bathed in perspiration,” Panum wrote, “and, when the bedding was raised or the shin exposed, vapors literally rose from them like clouds.”

Because the Faroe Islands were so remote, Panum had an easy time observing the disease spread from person to person. He developed an eerie power of prediction. If one person developed a rash from measles, Panum knew that everyone else in the patient’s house would get sick two weeks later.

Panum noticed other predictable patterns, too. On average, he estimated, every infected person infected seven to nine other people. Today, the estimate for the average number of infections spread from each sick person is higher–between 12 and 18. By comparison, the figure for Ebola is only about two.

What made Panum’s observations all the more impressive is that he made them without knowing what was causing the measles outbreak. Scientists would not come to understand the nature of viruses for another five decades. The measles virus itself would not be discovered till in 1954, over a century after Panum’s stay on the Faroe Islands.

For the past five decades, scientists have been studying the measles virus, and yet many details of its life cycle are only now coming to light. As a virus, it has to do three things in order to avoid extinction: it has to invade a new host, make copies of itself, and get those copies to another host. At every step of the way, scientists are finding, the measles virus cranks up its chances of successful spread.

People get infected with measles viruses by breathing them into their lungs. The lining of the lungs contains immune cells that destroy incoming invaders and kill off infected cells. The measles virus boldly attacks these very sentinels. It uses a molecular key to open a passage into the immune cells. Once inside, it starts making new viruses that infect other immune cells. The virus-laden cells then creep from the windpipe to the lymph nodes, which are crowded with still more immune cells. It’s like a walk in Disneyland, except inside a person’s body. From the lymph nodes, infected immune cells spread the virus throughout the body. If the virus manages to slip into the nervous system, it can cause permanent brain damage.

After several days of multiplying, the virus starts making preparations to leave its host. Some of the infected immune cells creep up into the nose. The interior lining of the nose is made up of sheets of epithelial cells. The immune cells nuzzle up to the epithelial cells. A protein on their surface, made by the viruses, fuses them to the epithelial cells, allowing the virus to cross over. Now the measles virus is another step closer to leaving its host and finding a new one.

Each infected epithelial cell start making huge numbers of new measles viruses, which it dumps out into the nasal cavity, where they can get exhaled. Meanwhile, the infection also damages the upper airway, causing infected cells to rip free and get coughed out of the body.

People sick with measles release clouds of virus-laden droplets. The big droplets fall quickly to the ground or other surfaces, where they can stay infectious for hours. The small droplets meanwhile rise into the air, where they are lofted by currents and can deliver measles to people far away.

The sheer number of viruses produced by each sick person, along with the adaptations the viruses have for penetrating deep into the airway, make them tremendously contagious. If someone gets sick with measles, up to ninety percent of people in the same home who aren’t already immune will get sick, too. And because infected people can transmit the virus for days before symptoms emerge, the virus can spread to many homes before anyone realizes an outbreak is underway.

The late-arriving symptoms of measles are the outward sign that people’s immune systems are starting to fight the virus. Much of the battle takes place between uninfected immune cells and infected ones. The fight decimates the immune system. Even after people have conquered a measles infection, it can take weeks for their immune system to get back to full strength.

In this fragile state, people become vulnerable to other diseases such as pneumonia. The danger posed by these infections depends on how much care patients can get. In industrialized countries, only a tenth of 1 percent of people who get measles die. In developing countries, the rate is 5 to 10 percent. In refugee camps, the figure can be as high as 25 percent.

While people cope with these post-infection troubles, the virus has moved on to its next hosts. The contagion of measles is part of a “one-and-done” strategy that the viruses have evolved. After people recover from measles infections, their immune systems will protect them for life. As a result, the virus needs to be highly contagious for its long-term survival.

This strategy also means that measles vaccines can be extremely effective. By teaching people’s immune systems what the measles virus looks like, vaccines provide protection for life.

All these features of the measles virus add up to a startling paradox. Despite being far more contagious than the Ebola virus, the measles virus is a far better candidate for complete eradication from the face of the Earth.

Ebola viruses mainly circulate between animals (scientists suspect bats are their normal host). Every few years, they get into humans and cause an outbreak. Bringing Ebola outbreaks to a halt doesn’t mean that the virus has become extinct. It just means that it has retreated back to its regular host.

Measles, on the other hand, only infects humans. If we could make our species measles-free, that would mean the virus had become extinct, never to return. And the life cycle of measles actually makes it possible to block its transmission from person to person. It’s very rare for infections to last more than a couple weeks, so that there isn’t the risk of people surreptitiously spreading the disease for years. People who do get sick won’t get sick again, taking them out of the pool of potential hosts. And we are fortunate to have a safe, effective way to break measles transmission: a vaccine.

While the eradication of measles is possible, that doesn’t mean it will be easy. It requires long-term commitment from the entire world. If a country immunizes less than 95 percent of its population, the virus can still spread efficiently from person to person.

Despite these challenge, the world has made giant advances against measles in the past few decades. Before the development of measles vaccines in the early 1960s, 7 to 8 million children died around the world every year. In 2014, that figure was down to 145,000 deaths. The World Health Organization estimates that between 2000 and 2013, measles vaccination prevented 15.6 million deaths. In the coming decade, new vaccination campaigns may drive down deaths from measles even more.

But the Disneyland outbreak demonstrates just how quickly the measles virus can undo years of public health efforts. By 2000, the United States had reduced measles to the point that it could no longer circulate on its own inside the country. A few cases cropped up each year, imported by people traveling from other countries where measles is still a problem. But in recent years measles cases have bounced back–helped by a growing number of unvaccinated people.

The rate of measles vaccination is slipping year after year. In Arizona charter schools, 9 percent of kindergarteners have been exempted from vaccination. People who don’t vaccinate their children tend to live close by each other, creating pockets of vulnerability where measles outbreaks can endure, as the virus finds one host after another. The vulnerable also include children who are either too young or too sick with other diseases to get a vaccine.

It’s possible that the Disneyland outbreak will mark a turning point–a recognition that vaccination is a social contract we make to each other, so that we don’t allow the virus to infect our fellow citizens. Perhaps we will someday even eradicate measles from the face of the Earth. That will unquestionably be a boon for humanity. But it’s also possible that it could open the way to a new disease.

That’s because the measles virus has cousins.

Measles belongs to a cluster of viruses called morbilliviruses. They infect a wide range of animals, from whales to wildebeest, from pandas to primates. It appears that morbilliviruses use the same strategy as measles–coming in through immune cells and going out through epithelial cells. And they’re also just as contagious. Some studies suggest that measles started out several thousand years ago as one of these wild morbilliviruses. According to one theory, after we domesticated cattle, a cow morbillivirus jumped into humans. As human populations grew dense, the new measles virus found a comfortable new home.

Scientists have documented virtually no cases of morbilliviruses spreading from animals to humans. Given the staggering contagiousness of morbilliviruses, that’s pretty amazing. It’s possible that our immunity to measles also protects us from other morbilliviruses. These animal viruses may sometimes make incursions into our species, but the conditions are so harsh that they never have time to adapt to our biology.

If that’s true, it’s possible that the eradication of measles would open up a new ecological niche that another animal morbillivirus could invade. This possibility doesn’t mean that we should stop fighting measles. Instead, we should broaden our efforts. Even as we eradicate measles, we should become better acquainted with related viruses and prepare for the possibility that they may become new threats. With the lessons we learn from eradicating measles, we can be ready to battle the next master of contagion.