A plan to allow a state lottery in Alabama survived by the slimmest of margins on Thursday and moves on for consideration by the House of Representatives.

House Speaker Mac McCutcheon said in a text message Friday he was not sure when the House would take up the bill but said it will be addressed.

The bill by Sen. Greg Albritton, R-Atmore, passed the Senate a 21-12 vote, with two Democrats joining 19 Republicans to get it over the top. Twenty-one was the minimum needed to pass.

Constitutional amendments require a three-fifths vote. So the amendment will need 63 votes in the 104-member House.

If the bill passes, it would be on the ballot for voter approval in March 2020, during the presidential primary.

The Legislative Services Agency estimates the lottery would generate about $167 million a year after prizes and expenses.

An amendment added by the Senate on Tuesday tweaked the plan for how that money would be used.

The revenue would initially be directed to repay $184 million transferred from the Alabama Trust Fund to prop up the state budget in 2013, 2014 and 2015.

After the Alabama Trust Fund is repaid, half of the lottery revenue will go to the state General Fund, which helps support the operating budgets of Medicaid, prisons, state law enforcement, courts and dozens of other agencies.

As for the other half, an amendment by Sen. Clyde Chambliss, R-Prattville, provides that it will initially go into a new reserve fund for the state General Fund. When the amount in the reserve fund reaches 10 percent of the General Fund budget, that half of the lottery revenue would then go to the Alabama Trust Fund.

Chambliss said that was a sound way to allocate the money, paying debt first and then storing half of the money for a rainy day. Chambliss is the sponsor of a separate bill that creates the new General Fund reserve. It has passed the Senate.

Albritton, who is chairman of the Senate’s General Fund committee, was asked Thursday if it will be harder to convince voters to approve a lottery that supports the General Fund, as opposed to education. Albritton said he didn’t know but said the General Fund has the most need.

Revenue projections will allow the Legislature to appropriate up to $7.1 billion from the Education Trust Fund next year, $482 million more than this year. That’s because of surging individual state income taxes in a relatively strong economy.

“A half billion dollars,” Albritton said. “Now that’s a lot of money. The General Fund has a little more money."

The General Fund budget bill passed by the House appropriates $2.1 billion from the General Fund, about $90 million more than last year.

Although the General Fund is on sounder footing than in most recent years, Albritton said increased obligations for Children’s Health Insurance, courts and other programs are looming. A major need is increased funding for the state prison system, which faces federal court orders and pressure from the Department of Justice to dramatically increase staffing and improve safety and health care for prisoners.

“The General Fund has always been strangled,” Albritton said. “It always funds everything else. And it has a lot less money and a lot more hands.”

This story was corrected at 8:40 a.m. to say that Sen. Clyde Chambliss is sponsor of the bill creating a General Fund reserve account.