State Sen. Mark Obenshain (R-Rockingham) speaks on the floor of the Senate during the session at the Capitol in Richmond. (Steve Helber/AP)

— Legislation to amend the state constitution to promote charter schools went down in a surprising defeat in the Virginia Senate on Monday.

The denial of the measure was a blow to conservatives, who got the Republican-led House and Senate to pass an identical resolution last year. But this time, two Senate Republicans voted against it. Neither one spoke against it during the floor. However, Democrats who led the charge against the bill said it would undermine the authority of local school boards.

The measure was one of dozens that the Senate and House of Delegates dispensed with one day ahead of “crossover,” the deadline for Senate bills to pass that chamber and move to the House, and vice versa.

Amid the push, a bill meant to make it easier for Virginians with severe forms of epilepsy to obtain therapeutic oils made from marijuana got a last-minute reprieve Monday from a Senate panel.

That bill seemed in danger of dying in a Senate committee, where it had lingered for about a week. But the bill received and survived a critical vote in a hastily called meeting of the Senate Courts of Justice Committee. It is expected to come to the full Senate Tuesday.

The defeat of the charter school amendment caught many by surprise, however.

Early in the session, the measure appeared to be headed for the November ballot, with passage expected in both chambers. But more recently, the resolution appeared to be in trouble in the Senate, as day after day Sen. Mark D. Obenshain (R-Rockingham) asked that the vote be put off.

When Obenshain finally called for a vote Monday, it failed 21 to 19, with Sen. Emmett W. Hanger Jr. (R-Augusta) and Sen. Ben Chafin (R-Russell) opposed.

The proposal would have given the state Board of Education the authority to establish charter schools within local school districts across the state. That power currently rests with local school boards, which have been so resistant that only nine exist statewide.

To change Virginia’s Constitution, a proposed amendment must pass the General Assembly in two consecutive years, with an election in between. It then needs approval from voters in a referendum.

The vote followed a passionate debate, with Obenshain arguing that they would provide a “lifeline” for poor children in a state that provides “a world-class education in some jurisdictions . . . [and ] a third-world education” in others.

“We have kids we are ruining and are forgetting about,” he said.

Democrats said allowing the state to approve charters would undermine the authority of local school boards.

“I would hope we would not make this radical change in what has been a bedrock principle,” said Sen. John S. Edwards (D-Roanoke). “If there's any demand [for charters], localities can do it.”

The action on the marijuana oil bill drew tears from some parents with epileptic children, who said they have been struggling to obtain the oils. They are sold legally in Colorado but makers there are wary of shipping across state lines in violation of federal law.

The parents also risk prosecution for travelling to Colorado and transporting the oils. And they would have to make frequent trips because the oils have a 30-day shelf life.

“I have to be very creative and risk a lot,” said Beth Collins of Fairfax, who had traveled to Richmond to press lawmakers on the legislation.

Obenshain, chairman of the committee, warned that passage would bring Virginia “one step closer” to legalizing marijuana.

Some of the Senate’s most conservative Republicans joined with Democrats to advance the bill. Only one other Republican, Sen. Bryce Reeves (Spotsylvania), joined Obenshain to vote against it. Majority Leader Thomas K. Norment (R-James City) abstained.

Last year, the General Assembly passed a law intended to spare epileptics and their caretakers from the risk of prosecution for possession of the oils. But the measure stopped short of legalizing the oils and did not provide a way for patients to obtain them.

The current bill, sponsored by Sen. David W. Marsden (D-Fairfax), would direct the state Board of Pharmacy to develop regulations to allow pharmaceutical companies to apply for a state permit to produce the oils. That process could take nearly a year, he said.