In a move hailed by advocates as pivotal in the 30-year battle against AIDS, the Food and Drug Administration on Monday approved for the first time a drug for preventing infection by the virus that causes the disease.

The FDA greenlit the drug, Truvada, for people at high risk for HIV — namely, men who have sex with men and partners of people who carry the virus.

Margaret Hamburg, the FDA commissioner, said in a statement that the approval “marks an important milestone in our fight against HIV,” which infects some 50,000 people each year in the United States, a figure that has remained stubbornly steady for nearly two decades.

“I think it’s very good news,” said Chris Collins, vice president for the nonprofit amfAR,the Foundation for AIDS Research. “We need more prevention options to effectively tackle AIDS in the U.S. and globally.”

When combined with “safer sex” practices such as condom use, Truvada can reduce the risk of contracting HIV, the FDA found, pointing to two large studies.

The first study, in 2,500 men worldwide, found that Truvada reduced the risk of HIV infection by 42 percent compared to an inert pill. The second study, of heterosexual couples with one HIV-positive member, showed that Truvada decreased the risk of infection by 75 percent.

The challenge now, advocates say, is getting the expensive drug — it costs as much as $11,000 a year — to the groups in the United States who are at the highest risk for HIV: gay men in general and gay young black men in particular. Black women are also at higher-than-average risk.

“Many of them don’t have insurance, many don’t see a doctor,” said Collins of the high-risk groups.

Researchers are preparing pilot projects to deliver Truvada to high-risk groups. In San Francisco and Miami, a project will give Truvada free of charge to 500 people visiting public sexually-transmitted disease clinics.

“The goal is to evaluate the use of [Truvada] in a more ‘real world’ setting,” said Albert Liu of the San Francisco Department of Health, which is leading the project.

Breaking with other AIDS advocates, one vocal group denounced the approval. “It’s a catastrophe,” said Michael Weinstein, president of the AIDS Healthcare Foundation, which provides AIDS treatment in clinics worldwide. Some people with Truvada prescriptions will fail to take the pill every day, Weinstein said — and thus lose protection.

Indeed, in one pivotal study, nearly half of the men given Truvada did not take the pills daily.

“Drug adherence is really key here,” said Jennifer Kates, an HIV policy expert at the Kaiser Family Foundation who supports the approval.

Weinstein also cited concerns that people unknowingly infected with HIV may take the drug anyway, possibly fostering drug-resistant strains of HIV.

However, the FDA requires HIV-negative blood tests before prescribing Truvada. The drug’s packaging will carry a boxed warning that states that Truvada “must only be prescribed to individuals confirmed to be HIV-negative immediately prior to initial use and periodically during use.”

Truvada, made by Gilead Sciences Inc., combines two drugs that interfere with the replication of HIV. In 2004, the FDA approved the drug for treating HIV infection, and it has become a blockbuster for the California company.

An FDA advisory committee voted in May to recommend the approval. But several members dissented amid concerns that men taking the drug would view it as a license to stop using condoms and engage in risky sex.

Several members also expressed worries that when confronted with side effects such as diarrhea, healthy people with a Truvada prescription will stop taking the drug daily, reducing its effectiveness and increasing the risk of fostering strains of HIV resistant to Truvada.

In response, the FDA is asking Gilead to collect HIV virus samples from patients that become HIV-positive while taking Truvada. Analyzing the viruses will reveal any troubling drug-resistant mutations.