A doctor holds Truvada pills in her office in San Francisco. (Jeff Chiu/AP)

An early test of a new drug and method of blocking HIV infection suggests they could overcome one of the biggest obstacles to combating the virus by keeping people on their medication, according to research released Tuesday.

The approach uses a small implant the size of a matchstick, inserted in the upper arm, to slowly release a new medication that appears to block the virus for a year or more. If it is proved safe and successful in larger studies, the method could be a major improvement for people at high risk of contracting HIV who have trouble adhering to the once-a-day pill regimen and other available methods.

The new drug, islatravir, and the implant were developed by the drug company Merck and described at a news conference at an international gathering of HIV researchers in Mexico City. It was tested on just 12 people, at two different concentrations. Another four test subjects received a placebo, in an early study designed to assess the safety of the drug and implant. They are years away from being publicly available.

But the effort has prompted interest because the new drug is potent and the method of releasing it could solve a long-standing problem for people who have trouble with other methods of blocking HIV. In the United States, that is mainly men from minority groups who have sex with other men. Overseas, young women in some African countries where HIV is prevalent also are still being infected at high rates.

In a separate study also released at the conference, Janssen Pharmaceutical Companies announced progress in broadening the response produced by a vaccine for a wide range of HIV strains circulating throughout the world.

That study tested a four-vaccine regimen on 152 healthy adults in Kenya, Rwanda and the United States. The vaccine appears to have a long-lasting effect, according to Hanneke Schuitemaker, a Janssen vice president who also spoke at Tuesday’s news conference. The company, part of Johnson & Johnson, plans additional study.

About 1.8 million people around the world were newly infected with HIV in 2017, according to the United Nations Program on HIV/AIDS. In the United States, 38,739 people acquired the disease the same year, according to the Centers for Disease Control and Prevention.

“For some, a once-a-day pill is perfectly adequate,” said George Hanna a vice president with Merck Research Laboratories. “But we know that for a large number of people at risk of HIV, the adherence is less than 100 percent.”

The Trump administration has pledged to halt 90 percent of new HIV transmission in the United States by 2030. The current method of a daily regimen of pre-exposure prophylaxis pills — better known as Truvada — is a key component of that effort.

But Truvada costs about $1,600 a month for those who must pay full price. Even some who can afford the drug, or who are aided by subsidies, have trouble adhering to the daily regimen. Others have never heard of it. As a result, only a fraction of the more than 1 million Americans who should be taking the drug are on it, according to the CDC.

The new implant prototype provided a continuous drug dose high enough to shield against the virus for three months, Hanna said. It is 10 times more potent than any other antiretroviral medication, and modeling shows that it should last a year. The implant can be taken out if a problem develops. Once the medication runs out, the implant can be removed and replaced in a visit to a doctor’s office, he said.

Another long-term approach under development involves injections.

Merck is also looking into the possibility of using the same drug as an oral medication to treat HIV infections, Hanna said.