When I was diagnosed with HIV, I had no idea that one of the biggest challenges I would face would not be juggling medical appointments and treatment decisions or telling friends and family about my status, but simply keeping my apartment.

After I could no longer work due to my illness, I qualified for a rental assistance program administered by the HIV/AIDS Services Administration (HASA). The problem was that I was required to spend 70 percent of my disability check toward rent each month, leaving me with very little for all my other expenses. Within a year, I fell so far behind in rent that my landlord evicted me.

In January 2011, during one of the coldest days of the year, I had to leave my apartment with just the clothes on my back, a bag of medications and the necessary paperwork to confirm my existence. HASA moved me into a shelter that cost them significantly more than my apartment, even though it was just a shoebox room with no private bathroom, sink or cooking area, not to mention an actual kitchen.

More than 10,000 New Yorkers living with HIV/AIDS are at risk of becoming homeless, and the vast majority are Black or Latino. They’re in the same situation I was—forced to pay upward of 70 percent of their disability income or veteran’s benefits toward rent, even though they qualify for a rental assistance program.

The key difference between New York’s HIV/AIDS rental assistance program and every other comparable low-income housing program, including Section 8, public housing and supportive housing is that these other programs include an affordable housing protection so that the tenant pays no more than 30 percent of their income toward their rent. Without that rent cap, the housing assistance becomes self-defeating, because people fall behind and lose their apartment.

A loophole in state law has required tenants in the HIV/AIDS rental assistance program—all of whom are extremely low-income—to spend all of their disability income on rent so that they are left with about $12 per day. It’s one reason why there are more homeless people living with HIV/AIDS in publicly funded for-profit shelters than at any time since 2005.

A bill placed before the state Legislature would provide fairness by ensuring people living with HIV/AIDS who qualify for rental assistance pay no more than 30 percent of their income toward their rent, bringing it in line with all other housing programs.

It would prevent homelessness for more than 10,000 individuals and families while enabling hundreds more to move out of the shelter system. And the cost? The affordable housing bill would pay for itself by reducing the number of homeless people living with HIV/AIDS in shelters that cost two to three times as much as rental assistance. Keeping people who have been permanently disabled by HIV/AIDS in their own apartments instead of shelters is better for their health and better for New York taxpayers. It’s that simple.

The Legislature already passed the bill with strong bipartisan support a few years ago, but former Gov. David Paterson vetoed it at the last minute after Michael Bloomberg lobbied hard against it.

Now that Bloomberg’s out of the picture—after leaving behind a record number of homeless New Yorkers in shelters—we have the best opportunity yet to pass this vital legislation. Mayor Bill de Blasio has a long history of supporting this legislation and promised to champion it during his mayoral campaign. Both de Blasio and Gov. Andrew Cuomo, who de Blasio worked for when Cuomo served as the secretary of the Department of Housing and Urban Development during the Clinton administration, know how important a 30 percent rent cap in housing assistance programs is for preventing homelessness.

Housing for people living with HIV/AIDS is health care. People living with HIV/AIDS who have stable and affordable housing are much more likely to have a healthy immune system and an undetectable HIV viral load and to practice HIV prevention.

There’s a growing scientific consensus that says we can end AIDS, even without a vaccine or cure. But all the advances in medicine and science will only be effective if people living with HIV have that most basic thing—safe, decent and affordable housing.

Reginald Brown is a leader in VOCAL-NY, a community organization dedicated to addressing the root causes of HIV/AIDS, mass incarceration and the drug war.