SACRAMENTO (CBS/AP) – California would take steps to regulate the sale of medical marijuana under a bill approved by the state Senate.

The measure is intended to restrict dispensaries that federal prosecutors say had grown out of control in California, where voters first supported legalizing cannabis to treat illness in 1996.

READ MORE: Berkeley Police Arrest Convicted Sex Offender For Allegedly Accosting Teens, Claiming To Be Police Officer

Federal prosecutors recently cracked down. They said the industry had become enormously profitable and made marijuana essentially available for recreational use.

The bill makes it clear that dispensaries cannot operate at a profit but that the owners can receive reasonable compensation and expense reimbursement.

READ MORE: Foster City Appoints 1st Minority Woman Mayor In 50-Year History

Senate President Pro Tem Darrell Steinberg says his bill, SB439, is intended to make marijuana available to those who really need it without violating federal law.

Senators sent the bill to the Assembly on a 22-12 vote Monday.

MORE NEWS: Steph Curry Closes In On 3-Pointers Record As Warriors Top Blazers

(Copyright 2013 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)