The Food and Drug Administration is not bound by the recommendations of its expert panel, but it usually follows the experts' advice. A final decision by the FDA is expected in mid-June.
The vote came after a marathon 11-hour panel meeting in which about three dozen health care providers voiced concerns about how the pill could boost risky behaviors and may lead to a drug resistant strain of HIV.
But others hailed the panel's recommendation for providing another prevention tool against human immunodeficiency virus.
"This brings us closer to a watershed for global HIV prevention efforts," said Mitchell Warren, executive director of AVAC (AIDS Vaccine Advocacy Coalition), after the vote.
Warren said pre-exposure prophylaxis (PrEP), or the method of taking a drug ahead of potential exposure to HIV, "while not a panacea, will be an essential additional part to the world's success in ending AIDS.
"For the millions of men and women who remain at risk for HIV worldwide, each new HIV prevention option offers additional hope."
Landmark study results published in 2010 showed that Truvada, made by California-based Gilead Sciences, helped ward off HIV in healthy gay men who engage in risky sex behaviors by 44 to nearly 73 percent.
The drug is currently available as a treatment for people with HIV in combination with other anti-retroviral drugs and received FDA approval in 2004.
The panel's nod came in response to the pharmaceutical company's request for a supplemental new drug application to market it for prevention purposes.
The Antiviral Drugs Advisory Committee voted for the drug as a preventive measure for three groups: 19-3 in favor for men who have sex with men, 19-2 with one abstention for couples in which a partner is HIV positive, and 12-8 with two abstentions for other at-risk groups.
Gay men account for more than half of the 56,000 new cases yearly of HIV in the United States, according to the Centers for Disease Control and Prevention.
But critics noted that the pill is costly -- up to $14,000 per year -- and could offer a false sense of protection, leading to a spike in unsafe sex and a new surge in AIDS cases.
"We need to slow down. I care too much about my community not to speak my concerns," said Joey Terrill, advocacy manager at the AIDS Healthcare Foundation, which campaigned against the drug's approval for PrEP.
There also remains some controversy about which populations would benefit, as trials in women have shown feeble results, possibly due to poor adherence to the regimen.
"I am concerned about the potential for development of resistance," said Roxanne Cox-Iyamu, a doctor who spoke at the panel's meeting.
"I am concerned as a black woman that we don't have enough data that this actually works in women."
According to nurse Karen Haughey, "human nature I believe is the reason why I believe Truvada will not work. It is not in our nature to always do as human beings what we are told 100 percent of the time."
She also said a major deterrent is Truvada's main side effects: diarrhea and risk of kidney failure.
"How do you justify that when you don't have HIV, when you aren't sick, when what you are taking will damage your kidneys and give you diarrhea every day?"
The main set of data considered came from the iPrEx HIV Prevention Study, carried out from July 2007 to December 2009 in six countries -- Brazil, Ecuador, Peru, South Africa, Thailand and the United States.
The study was conducted among 2,499 men who were sexually active with other men but were not infected with the virus that causes AIDS.
Participants were selected at random to take a daily dose of Truvada -- a combination of 200 milligrams of emtricitabine and 300 milligrams of tenofovir disoproxil fumarate -- or a placebo.
Those in the study who took the drug regularly had almost 73 percent fewer infections. Across the entire study, including those who had not been as faithful in taking Truvada, there were 44 percent fewer infections than in those who took a placebo.
After the study's publication in the New England Journal of Medicine, some experts hailed the results as game-changing and the first demonstration that an already-approved oral drug could decrease the likelihood of HIV infections.