“I think of this victory in California as a major victory,” said Lauren Mendelsohn, the chairwoman of the board of directors of Students for Sensible Drug Policy, a group that has campaigned against the government’s war on drugs. “It shows the whole country that prohibition is not the answer to the marijuana question.”

Ms. Mendelsohn spoke at a celebration in Oakland for the passage of Proposition 64, as California’s legalization measure was known.

Supporters of legalization in California vastly outspent opponents.

As of Nov. 6, pro-legalization committees in the state had raised around $23 million, according to the California secretary of state’s office. Chief among the backers were marijuana companies and tech entrepreneurs, including Sean Parker, a founder of the file-sharing service Napster and a former president of Facebook, who was the single largest donor to the campaign. The anti-legalization campaign had spent less than $2 million in California.

Kevin Sabet, the president of Smart Approaches to Marijuana, one of the country’s major funders against marijuana legalization initiatives, attributed the imbalance in campaign spending to investments by marijuana companies hoping to profit if the industry was legalized.

“There’s a lot of money to be made if marijuana is legal, not a lot of money to be made if it remains illegal,” he said.

Opponents of legalization say the adoption of medical marijuana laws in more than 25 states has led to a popular perception that cannabis is good for you. They have called for more studies on the drug’s long-term effects, particularly on the developing brains of young people.