In 1985, the first HIV vaccine trial was launched with great fanfare. The previous year, Margaret Heckler, the U.S. Secretary of Health and Human Services, confidently declared that an HIV vaccine would be created within two years. But almost four decades after the initial discovery of the HIV virus, there is still no viable HIV/AIDS vaccine. That doesn’t mean, though, that there is no cure. The grueling and largely thankless work of trialing an HIV/AIDS vaccine has continued steadily over the past four decades (the most recent one launched in January 2022, using Moderna’s mRNA technology), making it the longest-running modern pandemic.

But failure, in the hands of scientists, doesn’t mean the end. Instead, it is a sturdy foundation for scientific discovery. Rather than giving up, the failure to create a viable HIV vaccine spurred scientists to develop a whole new strategy to end the AIDS pandemic. Without vaccines available to teach human immune systems to kill the virus, scientists were forced to find other ways to keep infections at bay. And here’s where four decades of scientific failure was transformed into a radical approach to pandemic control, with direct implications for the future of the global effort to end COVID-19.

Without vaccines to stop new infections, HIV scientists pivoted to developing antiviral treatments to slow the replication of HIV in human hosts and thereby keep the tens of millions of HIV-infected people from becoming sick and dying. And this is where failure was transformed into unfettered success. The cocktail of HIV treatments known collectively as highly active antiretroviral therapy (HAART) is so effective at disrupting viral replication that it has transformed infection with that most deadly and protean virus, HIV, into a chronic condition. What’s more, HAART is so good at disrupting HIV’s ability to replicate that it can reduce the amount of virus in a person’s bloodstream to undetectable levels. That keeps people alive but it does something else as well: it makes it essentially impossible for a person living with HIV to transmit the virus to others. Treatment has become an unmatched strategy to prevent the spread the virus.

That’s a remarkable feat for a retrovirus like HIV, which has the highest recorded mutation rate of any biological entity. To overcome that innate advantage, the drugs in the HAART cocktail target multiple parts of the HIV virus. Simply put, the virus can’t mutate its way out of the multiple attacks the drugs make on its ability to replicate. This multi-pronged strategy has made HAART a long-term solution that hasn’t lost its effectiveness over time even as HIV has continued to evolve at a rapid clip. It’s also where HIV prevention intersects neatly with the COVID-19 ‘Test to Treat’ strategy that President Biden announced at the State of the Union. It could not come at a better time, as recent evidence suggests that a post-Omicron wave is steadily rising across Europe and Asia—and that the U.S. is at risk of a renewed surge.

Read More: Omicron Is Receding But the Pandemic Is Not Over

We now have three antivirals approved for use against COVID-19, all of which target regions of SARS-CoV-2 that are highly conserved, meaning they don’t mutate very much at all. That makes them far more resilient to variants compared to the COVID-19 vaccines, all of which target the fast-mutating spike protein. And that gives us a fighting chance to end this pandemic using weapons we can be confident won’t be obsolete in a year’s time. All we have to do is embrace the failure playbook.

Molnupiravir, Paxlovid, and Remdesivir, the three FDA-approved COVID-19 antivirals, target regions of SARS-CoV-2 critical to its ability to copy itself. At their most effective, they nullify the virus’s basic programming feature: replication. Instead of an elegant entity made up of macromolecules spring-loaded to enter cells, unfurl, and produce progeny ad nauseam, the antivirals make sure that the viruses that enter human hosts are the last of their kind. And that’s where effective treatment can become prevention: as the AIDS pandemic taught us, as long as you can stop a virus from replicating, you can stop it from spreading—both through a person’s body, ending their life, and across a population of transmissible hosts, ending an epidemic.

The ‘Test to Treat’ plan is part of a larger containment strategy in which the role of COVID-19 antivirals is only going to become more critical. With ‘Test to Treat’, the Biden administration is looking to rapidly increase access to antivirals (specifically Pfizer’s Paxlovid, which reduces the risk of hospitalization for COVID by nearly 90%) for people who test positive for infection at pharmacies. It’s a smart approach to reducing illness and death from COVID-19, and it may also set the stage for the end of this pandemic. That’s because, even if new variants find a way to escape the vaccines (the U.K. government estimates that a two-dose vaccine regimen is only 10% effective against Omicron), we can be confident that they won’t elude the antivirals, at least not in the short term. That’s why ‘Test to Treat’ should be the first step in a wholesale adoption of the failure playbook to end COVID-19.

Maintaining a supply of effective antivirals could allow them to be deployed strategically when outbreaks of new variants occur. That way, frontline healthcare workers, along with the families and close contacts of infected people, can be given doses to protect them from severe infections even before they’re infected, stamping out the next wave before it starts. Of course, that will only be possible with long-term funding for the initiative, something that is looking much more perilous after a congressional decision last week halted additional COVID-19 funding, causing the White House to announce that it would soon have to stop covering the costs of testing, vaccines, and antivirals and other treatments for uninsured people.

Read More: What to Know About the 4th COVID-19 Vaccine Dose

That’s shortsighted thinking, because what’s perhaps most impressive about the failure playbook is that it might just spell the end of all coronavirus pandemics, now and forever. That’s because the regions that the antivirals target aren’t just similar across SARS-CoV-2 variants: they are remarkably conserved across every one of the hundreds of coronavirus strains discovered, as quintessentially a part of coronaviruses as prehensile hands are to human beings. To date, the antivirals have been tested against SARS-CoV-2, SARS (the first human pathogenic coronavirus ever discovered), MERS (Middle East Respiratory Symdrome), and many, many other coronaviruses; in every trial, they were effective at significantly reducing the capacity of the viruses to replicate.

And that’s where the failure playbook, starting with Test and Treat, becomes truly great news for our species’s long conflict with coronaviruses. Regardless of whatever pathogenic coronavirus next emerges, it will also have those same genomic regions as the ones that came before, making it just as susceptible to the antiviral treatments developed to stop SARS-CoV-2. That should help blunt our understandable anxiety about a repeat of the last two years. Instead, as we look to the future, our species might for the first time in our history have something that has eluded us until now: a weapon to fight the future progeny of our ancient viral nemesis.