MONTPELIER — The Vermont Senate on Wednesday passed a hybrid aid-in-dying bill under which stiff safeguards would be in place for terminally ill patients seeking lethal medication for the first three years, after which regulations would be lessened significantly.

Sen. Claire Ayer, explaining her compromise amendment to the Judiciary Committee before the Senate’s 17-13 vote in favor of the bill, likened the system the bill would set up to training wheels used by beginner bicyclists. Many of the safeguards would expire in 2016, unless lawmakers act between now and then to preserve them.

If the House concurs before lawmakers’ scheduled adjournment for the year Saturday, Gov. Peter Shumlin is expected to sign the bill, which would bring to Vermont for the first time a legal method by which doctors could prescribe a lethal dose of medications to terminally ill patients who request it.

Shumlin issued a statement saying he knew Vermonters were divided on the issue.

“But I also know how important it is for those who face terminal illness and tremendous pain to have this choice, in conjunction with their physicians and loved ones, in the final days of their lives,” he said.

One of the spectators who have watched days of legislative debate on the issue, Marnie Wood of Middlebury, said after the vote, “Vermont in my mind has always been about choice, about rights.”

Wood cared for her sister, an Oregon resident, as her sister lived with amyotrophic lateral sclerosis, or Lou Gehrig’s disease, before she took advantage of Oregon’s first-in-the-country “death with dignity” law and ended her own life with a doctor’s help.

“She had a beautiful death,” Wood said.

Opponents of the legislation voiced disappointment that Vermont appeared poised to become the first state to pass an aid-in-dying law by legislation, rather than by referendum or court decision.

“I just don’t feel the government has any business getting between a doctor and patient,” said Sharon Iszak of Fairfax, a member of the Vermont Right to Life Committee who has been a regular presence at the Statehouse in recent days, along with others favoring or opposing the bill.

The measure followed a fraught and circuitous route to Senate passage, while the House passed it easily last week. When the Senate first took up the issue in February, an amendment was offered by Sen. Peter Galbraith, D-Windham and Sen. Robert Hartwell, D-Bennington that sought to limit what they said was government’s overly intrusive role under the original version of the bill.

On a 16-15 vote, with a tie broken by Lt. Gov. Phil Scott, the Senate passed a stripped-down version that shrunk the bill from 22 pages to one. It then went to the House, which restored most of the provisions in the original Senate version and moved it much closer to an Oregon-style law.

In debate over two days that ended Wednesday, the Senate then settled on the hybrid, in which an Oregon-style law would prevail for the first three years, then to be replaced July 1, 2016, by a more stripped down version similar to what the Senate passed in February. Passage came after Hartwell and Galbraith, critics of the Oregon-style legislation, joined the majority to support the compromise.

The Oregon-style provisions include three requests, one in writing, from the patient spread over 15 days, with two witnesses affirming the written request; a second doctor’s finding that the patient is terminally ill, and others. Those provisions expire after July 1, 2016.

Ayer said she had been in talks with House leaders and she expected the compromise would win approval there.