The Finance Committee approved a bill legalizing medical marijuana Friday in a 36-15 vote, but not before Sen. Toni Boucher spoke for an hour about the financial pitfalls it poses for the state.

The bill would allow patients with certain debilitating illnesses to use marijuana, which must be dispensed by a licensed pharmacist.

Boucher, a Republican from Wilton, is the legislature’s staunchest opponent of measures concerning marijuana, which she says is a dangerous drug. On Friday, she kept her comments primarily to the negative financial impact the bill may have on the state if it passes.

While the bill’s fiscal note anticipates that any costs created by the bill will be offset by its revenue, Boucher said the state should prepare for an onslaught of social services and litigation expenses if it insists on allowing the use of a substance the federal government considers illegal.

“We are contemplating making a very costly public policy change, which will put the state of Connecticut also in direct conflict with the United States Department of Justice as there appears to growing resistance to these bills from state to state,” she said.

In a series of failed amendments, Boucher tried to write language into the bill that would have increased the fees on marijuana producers in the hope of providing the state with funds to address the expenses she anticipated. She said producers of the substance will be in a position to pay fees higher than what is asked in the current bill.

“We all know how much profit is in the tobacco industry,” Boucher said. “Well, I’m sure the tobacco industry will pale in comparison to what we’re discussing here.”

She offered an amendment that would require producers to pay a licensing fee of at least $50,000. After the amendment failed on a 32-12 vote, Boucher offered another, which would have made the fee at least $25,000.

According to the bill’s analysis, the legislation already requires the Department of Consumer Protection to impose a licensing application fee of at least $25,000.

Rep. Chris Perone, D-Norwalk, asked if such fees were common.

“Is the state of Connecticut in the habit putting a fairly large fee like this on agricultural products in our state?” he said.

Boucher said she believed he could look to the tobacco industry to see if large fees were imposed there. However, she said marijuana wasn’t your typical agricultural product.

“Basically we only have the illicit drug trade to compare it to because there are very few other places to look at,” she said.

Another change Boucher proposed would have revoked producers’ licenses and made them subject to arrest and prosecution if they sold marijuana to anyone other than a licensed dispensary or sold it over state lines.

Currently, the bill asks producers to maintain a $2 million escrow account at an in-state bank. Under the amendment, they would have to forfeit that money to the state if they broke the rules. The money could be used by the state if it’s facing litigation from the federal government, she said.

“Will the state need to set up a defense fund in a budget line if in fact the Department of Justice steps in as they have done in California?” she asked.

After the committee rejected all her amendments — loosely along party-line votes — Boucher lamented that the bill was even raised this year, when she was thought the legislature would be focusing on education.

She said she had hoped “this would be a hopeful, positive year, a year that was supposed to be about education reform and instead that very worthy topic is overshadowed today in this committee and seems to be taking a back seat to what I think is sending a really wrong message . . . to our children.”

The Judiciary Committee, which approved the bill in March, heard passionate testimony from those impacted by the legislation. And the way the bill was drafted this year to only allow a pharmacist to dispense it increased its support among those who previously opposed it.