Californians heeded warnings of legal chaos and other dangers yesterday, and rejected a ballot measure that would have made their state the first to legalize marijuana for recreational use.

The spirited campaign over Proposition 19 pitted the state’s political and law-enforcement establishment against determined activists seeking to end the pot prohibition.

It was by far the highest-profile of the 160 ballot measures in 37 states. Other topics included abortion, tax cuts and health-care reform.

On a night of conservative advances in much of the nation, Massachusetts voters spurned a chance to cut their taxes — rejecting a proposal to lower the state sales tax from 6.25 to 3 percent. Critics said the cut would have forced the state to slash $2.5 billion in services, including local aid to cities and towns.

In Colorado, voters decisively defeated an anti-abortion “personhood” amendment — similar to one rejected in 2008 — that would have given unborn fetuses human rights in the state constitution.

California’s marijuana proposal would have allowed adults 21 and over to possess up to an ounce of pot and consume it in nonpublic places as long as no children were present, and grow it in small, private plots. It would have authorized local governments to permit commercial pot cultivation, as well as the sale and use of marijuana at licensed establishments.

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