California Gov. Gavin Newsom on Monday signed legislation allowing patients to buy HIV prevention pills without a doctor’s prescription.

Advocates of Senate Bill 159 say California is the first state to authorize pre-exposure prophylaxis (PrEP), and post-exposure prophylaxis (PEP), without prescriptions.

PrEP is a once-daily pill for HIV-negative people while PEP is a medication that people take to prevent the virus from taking hold.

Rick Zbur, executive director of Equality California, said Senate Bill 159 “is a huge improvement to removing a barrier” and helps reduce the stigma around the drugs, especially in rural areas and among minorities.

Nearly 30,000 people in California use PrEP and 6,000 use PEP, according to the California Health Benefits Review Program.

The California Medical Association was initially opposed to the legislation but became neutral about it after it was amended to limit the number of PrEP pills patients can get without a physician's note to 60 days, said Anthony York, spokesman for the association.

The association was concerned about "long-term use without physician oversight," he said.

GEORGIA POLICE INVESTIGATING AFTER WOMAN CLAIMS SHE INFECTED MEN WITH HIV IN FACEBOOK VIDEO

The law also prohibits insurance companies from requiring patients to get prior authorization before using insurance to get the drugs, eliminating another obstacle.

CLICK HERE FOR THE FOX NEWS APP

Pharmacists in California are already authorized to dispense emergency contraceptives and birth control without a prescription.

The Associated Press contributed to this report.