LOS ANGELES — A proposed California bill that would prohibit sales of flavored tobacco products in stores and vending machines in the nation's most populous state was withdrawn Thursday.

State Sen. Jerry Hill, D-San Mateo, said he pulled the legislation after "hostile amendments" were added to the proposed ban. He said the changes would have exempted tobacco used in hookahs, or water pipe smoking, and excluded tobacco products patented before 2000.

"I introduced Senate Bill 38 to protect young people from the dangerous health risks of tobacco products in any form and to prevent another generation from becoming addicted to nicotine," Hill said in a statement. "The aim was to prohibit tobacco products with fruit, candy and other flavors that entice young people from being sold in stores."

A variety of tobacco industry players opposed the bill, including Juul Labs and the Cigar Association of America, according to a Senate-prepared summary of the legislation.

"We have taken aggressive action to combat underage use of our products, while preserving the opportunity for adult smokers to switch from combustible cigarettes, which contribute to 40,000 deaths per year in California," Juul spokesman Ted Kwong told CNBC via email.

The bill was scheduled for a Senate floor vote Thursday. The amendments opposed by Hill were inserted into the state legislation last week in the Senate Appropriations Committee.

Three major health advocacy groups pulled their support for the amended legislation, including the American Lung Association, American Cancer Society Action Network and the American Heart Association.

"Exempting hookah products set a terrible precedent and undermine the foundation of the original legislation to protect youth, low income and minority communities from flavored tobacco," the groups said in a letter this week to Hill. The letter referred to the insertions in the bill as "hostile amendments."

Meantime, another tobacco measure — Senate Bill 39 — passed the state Senate earlier this month and would require stricter age-verification measures for online tobacco product sales. But the bill still faces hurdles in the Assembly.

More than 3.6 million high school and middle school students use e-cigarettes, according to a report released in November by the Food and Drug Administration. It indicated that the number of students using the e-cigarettes has soared almost 13 times since 2011.

In November, Juul announced it would temporarily stop selling most of its flavored nicotine pods for its e-cigarettes. Last year, tobacco giant Altria disclosed a 35% stake in Juul, which has captured about 75% of the e-cigarette market.