ALBANY — There was a time when the diagnosis of H.I.V. was a death sentence, when thousands of New Yorkers, primarily gay men, succumbed to AIDS-related illnesses, and the end of the epidemic seemed both medically and mentally impossible.
On Wednesday, however, Gov. Andrew M. Cuomo declared that New York is on track to meet its goal to end the AIDS epidemic in the state by 2020.
After decades of fearsome infection rates, the state in 2018 had just 2,481 new diagnoses of the virus that causes AIDS, a drop of 11 percent from the previous year, and 28 percent less than 2014, when the state began its initiative.
The governor’s three-pronged plan to combat AIDS is centered around identifying, tracking and treating people with H.I.V. infection, including using pre-exposure prophylaxis, or PrEP, drugs that can drastically reduce the risk of contracting H.I.V. through unprotected sex.
The governor said some 32,000 New Yorkers were now using PrEP, an increase of 32 percent since 2017.
“This new data shows we are on track to meet that goal and continue our historic progress to finally bend the curve on an epidemic that has taken too many lives for too long,” Mr. Cuomo said in a statement.
Experts in the field say that the progress being made in New York — particularly in New York City, long an epicenter of infection — is the result of a number of factors, including the use of PrEP and the ease of antiretroviral drugs, which suppress levels of H.I.V.
“Those two things together have been a revolution,” said Jen Kates, director of global health and H.I.V. policy at the Kaiser Family Foundation in Washington.
In particular, Ms. Kates said that the state and the city had embraced rapid initiation of antiretroviral treatment for those diagnosed with H.I.V., sometimes on the same day as a positive test result.
The new data from New York — where AIDS cases have been reported since 1981 — is striking when compared to the terrifying early days of the disease, when many otherwise healthy young gay men and others were stricken and died. State health officials say they believe they are on track to lower the number of new H.I.V. diagnoses to a little more than 1,500 per year by 2020.
They are also seeking to get the estimated number of people infected every year — a term known as incidence — below the number of annual deaths, a metric that officials have said would signal an end of the epidemic.
At the same time that New York and cities like San Francisco have made major inroads in fighting AIDS, national health officials have been troubled by a leveling-off in H.I.V. prevention efforts, including in some rural areas and southern states.
A February report from the Centers for Disease Control and Prevention showed that rates of infection between 2010 and 2016 had remained stable among gay and bisexual men, who make up more than two-thirds of new infections, with a marked increase among Latino men.
New York City officials say the strides there have been remarkable: In 2000, AIDS-related illnesses were the third leading cause of premature mortality. In 2017, the disease had fallen to 10th on that list.
Dr. Oxiris Barbot, the commissioner of the city’s Department of Health and Mental Hygiene, said that continued declines in H.I.V. infections was a result of a coordinated “data-driven, sex-positive approach.”
“It’s been part of our effort at chipping away at the stigma,” Dr. Barbot said, adding, “Not only are we seeing decreasing numbers of New Yorkers newly diagnosed with H.I.V., but they are living long and thriving lives.”