LOS ANGELES — California voters said no thanks Tuesday to a ballot initiative that would have made it the first state to legalize marijuana for recreational use and sales.

Proposition 19 would have made it legal for adults 21 and over to possess up to an ounce of marijuana, smoke the drug in nonpublic places and grow it in private plots.

The proposed law also would have authorized local governments to permit commercial pot cultivation and sales.

Proponents pitched the initiative as a sensible, if historic, experiment that would provide much-needed tax revenue for the state, dent the drug-related violence in Mexico by causing pot prices to plummet, and reduce nonviolent marijuana arrests that they say disproportionately target minority youth.

The state branches of the NAACP and the League of United Latin American Citizens endorsed it, along with several retired police chiefs and narcotics officers.

Popular support had been hampered, however, by opposition from some medical marijuana activists, growers and providers, who said they feared the system they have created in the 14 years since California became the first state to legalize medical use of marijuana would be taken over by corporations or lose its purpose.

Every major newspaper, both political parties, the two candidates for governor and all but a handful of leading politicians came out against it.