LOS ANGELES — California will test an HIV-prevention pill in an attempt to slow the spread of the disease in the state, researchers announced Tuesday.

The pill, which is already used to treat HIV patients, will be prescribed to 700 gay and bisexual men and transgender women in Los Angeles, San Diego and Long Beach who are high-risk but not infected.

“With this new prevention pill, we have another intervention to put in the arsenal to try and impact this epidemic,” said George Lemp, director of the California HIV/AIDS Research Program with the University of California president’s office.

The program awarded $11.8 million in state grants for the prevention pill studies and efforts to get about 3,000 HIV-infected people in Southern California into treatment and keep them there. The grants will go to a group of UC schools, local governments and AIDS organizations.

There are an estimated 140,000 people living with HIV or AIDS in California, including about 30,000 who don’t know they are infected, Lemp said.

The pill, under the brand name of Truvada, is already approved by the Food and Drug Administration for treating HIV but not for prophylactic use. In 2010, a study published in The New England Journal of Medicine said that it reduced the risk of contracting HIV by 44 percent to 73 percent, depending on how often participants took their medication.

The two-drug pill, produced by Gilead Sciences in the Bay Area, has side effects that include nausea and vomiting, and possible kidney problems when used with other anti-HIV drugs.

A recent Stanford University study showed that the pill, which costs about $26 a day, only makes sense economically if prescribed to people at high risk, such as those with multiple partners.

The prevention pill and counseling have “enormous possibilities” for high-risk people, said Phil Curtis of AIDS Project Los Angeles, which will recruit participants. But more research is needed to measure the effects in the real world, he said. “It is unrealistic to expect that a patient without HIV is going to see a doctor every month,” he said.

Critics say there is not enough evidence of the pill’s effectiveness to support its use. In addition, they say the pill could lead to more men not using condoms and result in more new infections.

“Men — gay, straight, bisexual — don’t want to use condoms,” said Michael Weinstein, president of the AIDS Healthcare Foundation. “That’s universal. If they are given another reason, then they won’t.”