Sacramento, Calif., and Los Angeles - California Governor Jerry Brown on Friday signed into law the state's first comprehensive regulations of medical marijuana, two decades after legalization fueled a wild west of disparate local rules, a gray market in cultivation and concerns about the ease of obtaining the drug.The package of three laws, viewed by some as a possible framework for the eventual legalization of recreational marijuana in the most populous US state, would establish a Bureau of Medical Marijuana Regulation and regulate such activities as cultivation and dispensary licensing.The bills, which take effect in 2018, "establish a long-overdue comprehensive regulatory framework for the production, transportation and sale of medical marijuana," Brown, a Democrat, said in a signing statement on Friday. "This new structure will make sure patients have access to medical marijuana, while ensuring a robust tracking system."The bills regulate the cultivation of marijuana, which now frequently takes place on hidden gray market farms that strip water from the state's forests. They also require state tax and agriculture officials to develop a way to track the sale and development of marijuana products.The package was welcomed by advocates for medical marijuana, who said that some cities had cracked down too hard on local dispensaries in the absence of strong regulations."For years now local authorities have refused to allow medical marijuana businesses to operate," said Lauren Vazquez, a spokeswoman for the Marijuana Policy Project, which favors legalization of both medical and recreational marijuana. "They often cite the lack of state guidelines as a primary reason. Now that we have comprehensive and uniform regulations, cities should rethink their bans."Organizations favoring legalization of recreational marijuana for adults in the state are re-working proposed ballot initiatives to accommodate the structure set up in the new laws, she said.But opponents said the new laws would codify a business they still see as promoting potentially dangerous drug use.