Victory is in sight.

City officials say they are on the cusp of the once unthinkable — ending the HIV/AIDS epidemic as new medicines and treatment drove down the number of new cases to a 17-year-low in 2018, Health Department stats show.

And officials say it’s all thanks to the emergence of a new pill — best known by its shorthand, PrEP — that prevents the spread of the once-fatal virus.

It’s the kind of medical advance that Dr. Oni Blackstock only dreamed of when she first began treating HIV/AIDS victims in Harlem in 2005.

“It’s a pill a day and many folks able to take that are doing really well,” Blackstock said. “We’re really encouraged and heartened by these declines.’

The city is spending $23 million a year to promote the daily treatment to the city’s LBGT and minority communities, which were hit hardest as the disease raged unchecked in the 1980s and early 1990s.

The Health Department says the stats show its money wisely spent.

Doctors diagnosed just 1,917 people with the once-fatal disease in 2018, a 67 percent decline from the number of cases reported in 2001. And it’s a fraction of the 4,471 cases clocked in the five boroughs in 1985, as the crisis exploded into full public view.

If trends hold, the infection rate in New York City next year will drop below the epidemic levels as soon as 2020 for the first time in memory.

All told, more than 100,000 people across New York state have died from AIDS-related causes since the disease first struck.

Blackstock, who has treated HIV positive New Yorkers for the last 14 years, said modern medicine meant she could now offer her patients a lifeline.

“We’re seeing people living longer and longer with HIV,” Blackstock said.

“For a lot of my patients, HIV is not the key issue. Instead, they have issues around diabetes and high blood pressure — things people who don’t have HIV also deal with.”

The city’s $23 million effort also funds eight clinics offering low- to no-cost services for HIV testing and medical treatment.

HIV-positive City Council Speaker Corey Johnson said the city would keep fighting to put an end to the disease.

“This is truly something to celebrate, but we have so much work to do to further reduce HIV rates in New York City and make sure those who have the disease get adequate care,” he said.