SACRAMENTO — A state lawmaker this week introduced a bill that would prohibit employers from firing qualified medical marijuana users who consume pot when they’re not on the job.

The bill, proposed by Democratic state Sen. Mark Leno, also would make it illegal for employers not to hire someone solely because they use marijuana for medical reasons.

Leno, who represents Marin and parts of San Francisco and Sonoma counties, proposed a similar bill in 2007 that was passed by the legislature, but vetoed by then-Gov. Arnold Schwarzenegger.

“The bill simply establishes a medical cannabis patient’s right to work,” Leno told the San Francisco Chronicle. “It astounds me that there would be any controversy around it.”

The California Supreme Court ruled in 2008 that nothing in the state’s current medical marijuana laws bars an employer from firing medical marijuana users who test positive for pot.

Californians approved a landmark ballot measure in 1996 that legalized the use of marijuana for medical purposes. Leno said voters never intended for the measure to apply only to unemployed state residents.

Leno’s bill would exempt from protection workers such as doctors, nurses, school bus drivers and heavy equipment operators who hold so-called safety sensitive jobs. The term refers to work that would be directly affected if an employee was impaired.

Workers still could not use marijuana at work or during work hours, and employers could fire workers for being under the influence of marijuana at work, according to a legislative summary of the bill.

The California Chamber of Commerce opposed Leno’s 2007 bill, but a spokeswoman told the Chronicle they had not yet examined the current bill.

The Chamber was one of the most vocal opponents of last year’s statewide ballot measure that would have legalized marijuana for recreational use. The group said at the time that they believed Proposition 19 would have prevented employers from firing workers who smoked pot or were under its influence even at work.

The measure’s supporters disputed that claim.