If Republicans in Congress follow through on their promise to repeal the Affordable Care Act, millions of people will lose access to essential health services. Tens of thousands of those will be people living with HIV, for whom a delay or disruption in health care will have serious and lasting consequences.

But ensuring affordable and accessible care for people with HIV is also necessary to prevent new HIV infections. These days, with consistent maintenance of treatment regimens, people living with HIV can often get their viral loads low enough to be “undetectable,” meaning they are virtually incapable of transmitting the virus to others. Advances in retroviral medications and increased availability of adequate health care have been essential to lowering rates of new HIV infections in the United States. The ACA has been an important contributor to that trend.

Before Barack Obama signed the ACA, just about 13 percent of people with HIV had private health insurance; many were on Medicaid, but 24 percent had no health insurance at all. Patients would have to wait until they developed the opportunistic infections associated with advanced AIDS before qualifying for Medicare as a person with a “disability.” Private insurance companies routinely turned potential people away because they were living with HIV. Preventive services like HIV and hepatitis screenings often left patients with out-of-pocket costs, discouraging them from getting tested.

The ACA changed all that. Medicaid expansions in most states made thousands of people with HIV, who are disproportionately low-income, eligible for public insurance. In Illinois, for example, one in three people living with HIV in the state got health-care coverage through the Medicaid expansion or ACA individual insurance plans. Protections for patients with pre-existing conditions allowed others to enroll in private insurance. Insurers were forced to fully cover preventive care and barred from imposing annual or lifetime caps on coverage, an acute burden for people with chronic conditions like HIV. The ACA’s beneficial impact on care for people living with HIV has been so great, the Centers for Disease Control and Prevention calls it “one of the most important pieces of legislation in the fight against HIV/AIDS in our history.”

That fight encompasses far more than those already infected. Some of the millions who gained insurance under the ACA are now able to afford pre-exposure prophylaxis, or PrEP, a regimen currently comprising a daily pill, Truvada, that protects users against HIV infection with an efficacy rate up to 99 percent. It would be nearly impossible to calculate how many new HIV infections have been prevented by increased access to affordable health care under the ACA for people with HIV—disaggregating falling transmission rates from other behavioral and health changes prompted by better medical care would be difficult—but any uptick in consistent treatment for people with HIV helps curb the virus’ spread.

The flip side of that fact is this: If the ACA is repealed without an immediate replacement that keeps all the aforementioned benefits in place, some people living with HIV will experience an interruption in or elimination of their care, leading almost certainly to new cases of transmission. If they miss doses of medication, they may develop resistance to those drugs, putting them at risk for debilitating infections or the need for an even more expensive new line of treatment. Many people with HIV will likely be able to get their health care covered by the federal Ryan White HIV/AIDS Program, but uninsured people at risk of contracting the virus—especially black men who have sex with men, one in two of whom will contract HIV in his lifetime if current rates endure—will be left without much of the preventive protections the ACA directly or indirectly provided.

Since HIV is an infectious disease, the government has strong economic and public-health interests in stopping its spread. Eliminating the ACA would exhibit a stubborn willingness to put politics ahead of the progress the country is making on improving HIV treatment and eliminating new infections. Just ask Mike Pence, one of the hardest-charging advocates for tearing down the ACA. When prayer failed to stymie the epidemic-level outbreak of HIV in Indiana during his tenure as governor, he relied on the ACA’s Medicaid expansion to give people the medical treatment and substance-abuse counseling they needed.