The District has reached new milestones in its effort to end a decades-long HIV epidemic, according to a report released Thursday, with a reduction in new cases and the overwhelming majority of those who have the virus in effective treatment.

In 2019, the city recorded its largest decline in new infections since Mayor Muriel E. Bowser (D) took office in 2015 and crafted a strategy for ending the epidemic, which has afflicted nearly 2 percent of city residents.

A key benchmark in that strategy is to cut the number of newly infected people from nearly 400 in 2015 to about 200 in 2020 — a goal public health authorities described as ambitious but achievable.

The annual public health report shows 282 D.C. residents contracted the virus last year, a 16 percent year-over-year decline after several years of little movement. Next year’s report will contain data from this year.

While officials across the nation have heralded the end of the darkest days of the AIDS epidemic, they are now pursuing the tougher job of nearly eliminating the virus altogether. The threshold for ending an epidemic is when less than 1 percent of the population is infected.

“It’s the first time we had less than 300 new diagnoses in the city since 1984,” said Michael Kharfen, who leads sexually transmitted disease prevention at the D.C. Department of Health. “However, I also see any new diagnosis as a failure of our entire system because we have the tools to prevent HIV. So we still have work ahead of us.”

Those tools have evolved from the days of urging safe sex or abstaining from sex and intravenous drugs. Needle exchange programs have nearly eliminated infections among intravenous drug users. And drug therapies have dramatically reduced the transmission of HIV through risky behaviors.

City health officials attributed the latest decline in new cases to two factors: the rise in the use of a daily prophylactic pill, commonly known as PrEP, that cuts the risk of HIV transmission by 90 percent; and the growing percentage of infected people whose treatment has kept their viral load so low that it cannot be passed to others.

This year the novel coronavirus has made it more challenging to reach people in need of those treatments, forcing the District to change strategies.

The city now provides PrEP to people without requiring HIV blood tests first, because of restrictions affecting facilities that conduct such tests. And they provide infected patients a 90-day supply of the drugs that reduce viral loads to the point that the virus cannot spread, instead of a 30-day supply, so fewer medical appointments are needed.

LaQuandra Nesbitt, the city’s top public health official, said doctors are still prioritizing HIV patients for visits, blood tests and medication refills. But the city has seen a 60 percent decline this year over last year in people coming in for annual checkups, which are often where people are tested for HIV.

With the pandemic hampering in-person distribution, health officials are offering to mail at-home HIV test kits and 10 condoms to any resident who requests them, free of charge.

The 2019 HIV report included some more sobering news as well: The number of at-risk people the District persuaded to take to PrEP last year was 1,700, down from 3,400 in 2018 — raising the possibility that distribution of the drug will have less impact on new cases this year. Kharfen said those figures don’t include people who started taking the drug without the help of the D.C. government.

Gay or bisexual black men and black women continue to be at the greatest risk of contracting HIV, the report showed. Men having sex with men is still the leading source of transmission, accounting for more than half of new cases in 2019. But those cases declined to 155 in 2019, from 198 in 2015. Women having sex with men is the second-leading cause — linked to a fifth of cases last year.

In addition to slashing new cases in half by the end of 2020, Bowser set a goal of having at least 90 percent of residents estimated to be living with HIV aware of their status and in treatment. In addition, she wanted at least 90 percent of those in treatment to have viral loads so low that they cannot infect others.

The District is on the brink of achieving all three goals, the report said. Ninety percent know their status, 80 percent are in treatment and 87 percent of those in treatment cannot infect others — which is higher than the 69 percent of all HIV patients living in the city who are considered virally suppressed.

The nation’s capital has come a long way since AIDS ravaged communities in the 1990s an era when the city’s population was substantially lower than it is now but new infections topped 1,000 annually.

And because of advances in treatment, HIV is no longer akin to a death sentence. Between 2013 and 2017, a total of 399 residents died of complications related to the virus, about the same number of annual deaths recorded in the late 1990s and early 2000s.

Before he became famous as the face of the national pandemic response, Anthony S. Fauci was one of the infectious-disease doctors at the forefront of battling AIDS nationwide. In 2015, he called the nation’s capital “the prototype of the true feasibility of this goal of ending the epidemic as we know it right now.”