In April 1947, researchers in Uganda discovered a new virus in the blood of a feverish monkey. The following January, they found it again—this time in mosquitoes buzzing through the forest where the monkey lived. The virus eventually took the forest’s name: Zika. In the following decades, Zika was largely forgotten, as other newly discovered viruses hogged the limelight, including those that cause measles, the common cold, hepatitis, AIDS, Ebola, SARS, and more. But Zika hadn’t gone away. In fact, it was on the move.

In May 2015, a huge outbreak of Zika began in Brazil, infecting more than 200,000 people. From there, the virus spread explosively to dozens of other countries in the Americas, and all 50 U.S. states. And since Zika can cause microcephaly—a birth defect characterized by small head size—it caused fear wherever it landed. The outbreak has now abated, and just two weeks ago, Brazil finally ended its state of emergency. But as before, Zika hasn’t gone away. With summer approaching and mosquito populations rising, the key to predicting and controlling Zika’s future lies in understanding its past.

As viruses spread, they accumulate changes in their genomes. By collecting viruses from different places and comparing their genomes, scientists can work backward to estimate when and where an outbreak would have actually begun. A huge international team of scientists has now done just that for Zika.

Sequencing hundreds of viral genomes, they reconstructed the virus’s voyage into and around the Americas. They’ve shown how often it entered the U.S. and why Miami was a perfect and singular gateway for it. And perhaps most importantly, they’ve confirmed what many had believed: In almost every affected country, Zika was already there for months—or even years—before the first cases were reported.

“It’s a big reminder that surveillance is a major issue, and we need to double down on it,” says Pardis Sabeti from the Broad Institute and Harvard University, one of the leaders of the study. “We’re letting these things go undetected for a long period of time.”

Sabeti and her colleagues used a similar approach to trace the spread and evolution of Ebola during the recent West African outbreak. But Zika is a far more challenging virus. If you draw a milliliter of blood from someone with Ebola, you’ll pick up around 10 billion virus particles. If you do the same for a Zika patient, you’ll be lucky to pick up 10,000. These unusually low levels make Zika very hard to sequence.

To do so, Nicholas Loman from the University of Birmingham had to develop a new method for amplifying the virus in a blood or urine sample. He designed the technique to work on a USB-powered, pocket-sized DNA sequencer called the MinION, so his team could zip around Brazil in a mobile laboratory, screening more than 1,300 people for Zika and deciphering the viruses’ genomes on the fly.

Meanwhile, Sabeti and others were amassing similar sequences from at least 10 other countries and territories. And rather than sitting on their data while they waited to publish their papers, they immediately uploaded everything they had so that the entire scientific community could react.

Loman and Sabeti, together with Oliver Pybus from the University of Oxford, showed that all of their Zika strains descended from an ancestral virus that arrived in the Americas around January 2014—some 16 months before health authorities confirmed the first cases. It arrived in northeast Brazil, possibly using Haiti as a stepping stone. And having landed among people whose naïve immune systems had never encountered Zika before, the virus spread rapidly and established a staging ground.

From there, in the second half of 2014, it spread to populous southeastern cities like Rio de Janeiro and Sao Paulo, and made incursions into Honduras, Colombia, Puerto Rico, and various Caribbean islands. In every case, it landed between four and 12 months before it was detected.   

“It’s relatively mild in most people, so it didn’t get picked up,” says Kristian Andersen from the Scripps Research Institute. “We weren’t looking for it at all because we didn’t know it was there.” Even when symptoms show, they often overlap with those of other mosquito-borne diseases like dengue. And even when doctors detect cases, says Sabeti, “it takes a while for every party to communicate enough to really notice what’s happening. … It speaks to the very disjointed way in which we do surveillance.”

The same pattern emerged when Zika stormed the United States. By comparing Zika genomes from patients and mosquitos across Florida, Andersen showed that the disease entered the U.S. on at least four separate occasions, and possibly as many as 42. “Most of these probably just led to one case that we never detected,” he says, but a few led to sustained chains of transmission. His team calculated that Florida’s mosquitos started spreading Zika within the state in the spring of 2016, months before the authorities confirmed local transmission in July.

Even though Brazil was the epicenter of Zika in the Americas, Andersen’s study suggests that the strains that hit the U.S. came from the Caribbean. This partly explains why Florida was so badly hit. In early 2016, it received 3 million visitors from the Caribbean, the vast majority of whom arrived by cruise ships. (That’s not to say that “going on a cruise ship will give you Zika,” says Andersen. “Zika isn’t on the ships; the ships are just the vessels.”)

Most of Florida’s Zika outbreak took place in Miami-Dade County, and that’s probably because it’s the only part of Florida with a year-round population of the Aedes aegypti mosquito. In other parts of the U.S., Aedes exists, but its populations bloom too late in the year and it doesn’t encounter large floods of tourists from Zika-heavy sites. “Miami is unique,” Andersen says. “It’s the only place where you have vast amounts of cruises and flights coming in from the Caribbean and this population of Aedes that’s increasing in number just as the virus is coming in,” Andersen says.

No traces of Zika have been found in Florida mosquitoes this year, but Andersen and his colleagues warn against complacency. “Strong preventive measures are necessary to keep levels of Aedes aegypti low,” says Pedro Fernando da Costa Vasconcelos, the director of Brazil’s National Institute for Viral Hemorrhagic Fevers, who was not involved in the study.

“We should think about helping to fight Zika in the countries where it’s coming from, like the Caribbean,” adds Andersen. “For the U.S., supporting healthcare in the source countries isn’t a bad investment.”

In an editorial accompanying the new studies, Michael Worobey from the University of Arizona says that insights like these need to arrive earlier. He used to be a forest firefighter, and he recalls how his colleagues would track storms over fire-prone areas, pinpoint lightning strikes, and fly over as soon as possible to look for smoke. By contrast, today’s disease fighters are more like “valiant bucket brigades organized after the fire is out of control,” he writes.

The solution is to use genetic sequencing to regularly screen animals and people for Zika and other potential diseases. “We should be detecting such outbreaks within days or weeks through routine, massive, sequence-based approaches — not months or years later, when clinical symptoms have accumulated,” he writes. “We will not put out every new fire, but we will catch some—and improve our ability to respond to the ones that get away.”

The techniques that the group has developed will be useful for sequencing other viruses that stay at low levels when they infect human patients. But more importantly, their teamwork sets the standard for research in the middle of an outbreak.

“As much as I’m proud of the scientific work, I’m prouder of the collaboration,” says Sabeti. She, Andersen, Loman, and their colleagues all started working on Zika independently, but when they learned about each other’s projects, rather than competing, they decided to pool their resources. They shared their methods and data. When they wrote the papers describing their results, they approached journals about publishing them as a unit. “Outbreaks breed suspicion, paranoia, and stress, and that environment can change how people interact with each other. But this is how things should be done.”