Cities like Los Angeles and San Francisco were making huge dents in transmission. Thanks to Republican lawmakers, that could all end.

California and many other states are making real progress toward ending the AIDS epidemic. But if President-elect Trump and Republicans in Congress repeal the Affordable Care Act, California could be forced to scale back expansion of its Medi-Cal program and shut down the state’s health care exchange, making the goal of an AIDS-free generation harder if not impossible to reach.

Nationwide, efforts to end AIDS or “getting to zero”— meaning zero new HIV infections, zero deaths from AIDS, and zero discrimination — are primarily based on ready access to HIV testing, sexual health education, and potent antiretroviral medications that can block transmission of HIV and prevent new infections. We now know that HIV-positive individuals taking antiretroviral medications can virtually eliminate the possibility of transmitting the virus to others. And through a process known as pre-exposure prophylaxis, or PrEP, high-risk HIV-negative individuals can take similar medications to reduce their risk of acquiring HIV by up to 99 percent.

These strategies require access to quality, affordable health care for HIV-positive as well as HIV-negative individuals. And since AIDS is and has long been a disease of the poor, health coverage for low-income at-risk populations is essential.

Rates of new HIV infections in the United States have decreased or stabilized among many populations in recent years. California’s annual rate of new infections is down by over six percent between 2010 and 2014 (5,367 cases to 5,002). In Los Angeles and San Francisco, the decrease is more dramatic: Los Angeles County reports a 16 percent decrease between 2010 and 2013 (to 1,820 new infections) and last year San Francisco reported 250 new infections, a decrease of 90 percent of what the city reported in the 1990s.

HIV infection rates remain stubbornly high, however, among some populations, most notably transgender individuals and gay and bisexual men, in particular young African-American and Latino gay and bisexual men. In 2016 the Centers for Disease Control and Prevention estimated that at current rates, one in four Latino and half of all African-American gay and bisexual men will become HIV-positive in their lifetimes.

There are multiple reasons for these continuing rates of new infections, chief among them social and structural factors such as poverty, lack of education, stigma, and historically little or no access to health care.

The Affordable Care Act has changed the game in California and renewed hope that ending AIDS is possible. Health coverage is now available for low-income individuals through the state’s health care exchange, Covered California, and significantly, through the state’s Medi-Cal program. Both options provide subsidized or free health insurance for millions of low-income Californians — the exception being the majority of undocumented individuals who do not qualify for ACA programs.

Before the ACA, people living with HIV were shut out of the private insurance market because of preexisting conditions or cost, and relied on the federal Ryan White program for medical care. Medi-Cal generally did not cover low-income single men and women unless they were poor and elderly or met Medi-Cal’s stringent disability standards. For many at risk for HIV, that often meant getting infected, sick, and close to death before getting coverage.

With coverage now available for all, regardless of age, gender, disability, or health condition, low-income Californians can now access HIV medications, ongoing medical care, and PrEP for those at risk.

California estimates that the state will lose upwards of $20 billion if the ACA is repealed. That includes the federal funding for Medi-Cal’s expansion population — over 3.5 million Californians — as well as subsidies for low-income individuals who purchase insurance through the exchange. If the ACA is repealed, without an equivalent or improved replacement, the state will be compelled to make some very difficult choices between who gets coverage and who does not. HIV-positive people will likely have Ryan White coverage to fall back on. At risk HIV-negative individuals will not.

Access to health coverage for both HIV-positive and HIV-negative individuals drives the hope of getting to zero in California. Repealing the ACA would once again leave low-income individuals without health coverage and delay getting to zero into the too distant future.

PHIL CURTIS and CRAIG PULSIPHER are part of the government affairs team at AIDS Project Los Angeles.