Epilepsy patients in Texas would have access to medicinal oils containing a therapeutic component found in marijuana under legislation the state Senate passed Thursday.

Senators voted 26-5 to pass Senate Bill 339, by Sen. Kevin Eltife, R-Tyler, which would legalize oils containing cannabidiol (CBD), a component found in marijuana known to treat epilepsy and other chronic medical conditions. If the measure passes the House, by 2018, the state would be able to regulate and distribute the oils to patients whose symptoms have not responded to federally approved medication.

"While the bill is not the full-scale medical marijuana bill that many advocate for, we recognize that change takes time and this is certainly a step in the right direction," Phillip Martin, deputy director of the liberal group Progress Texas, said in a statement. “These bills are an important step and we are eager to see them set promptly on the calendars so they can be considered by the full Texas Legislature."

Eltife's proposal is the second marijuana-related bill to receive votes of support in as many days. On Wednesday night, a House committee voted 5-2 in favor of a measure that would legalize the possession and delivery of marijuana — a measure that looks unlikely to make it to the full House for a vote.

Meanwhile, a companion to Eltife's bill – House Bill 892 from Rep. Stephanie Klick, R-Fort Worth – passed out of a House committee earlier this week.

Some medical marijuana advocates are reluctant to support Eltife's bill, which would not offer access to cancer patients or veterans suffering from post-traumatic stress disorder. Eltife's Senate proposal also limits the presence of THC, or tetrahydrocannabinol — the psychoactive element in marijuana — in the oils to a level critics have said is too low to help many epilepsy patients.

In a committee hearing on the bill, opponents said they feared it could lead to an increased recreational use of marijuana. Others worried about public safety, believing that the products would be hard to regulate.

Texas is one of 16 states where marijuana is illegal for medical and recreational use. In recent years, 13 states have legalized CBD oil for certain medical conditions. Twenty-three other states and the District of Columbia have laws allowing broader use of medical marijuana.

Last year, a University of Texas/Texas Tribune Poll showed that 77 percent of Texans believed that marijuana should be legalized in at least some circumstances.

Ryan McCrimmon contributed to this story.