SACRAMENTO, Calif.—Drug users and underage drinkers seeking medical help will no longer have to fear charges under a so-called "good Samaritan" bill signed by Gov. Jerry Brown.

The governor announced Monday that he has signed AB472 by Democratic Assemblyman Tom Ammiano of San Francisco. The law, which will take effect Jan. 1, aims to save the lives of overdose victims by shielding them and those who would come to their aid from drug charges.

It decriminalizes the possession of drugs and drug paraphernalia when seeking medical assistance for an overdose, as long as the substances are for personal use.

Ammiano said the bill is needed to encourage witnesses and friends to call 911. Washington state and New Mexico have similar laws.