Attempts to legalize online gambling in Pennsylvania took a giant step forward yesterday after the Pennsylvania State Senate passed proposed legislation that would allow the state’s twelve casinos along with its lottery to offer their games over the Internet.

According to a report from the Associated Press, the online gambling legislation was created following months of behind-closed-doors negotiations before being ratified in the Republican-controlled chamber on Wednesday by a vote of 38 to twelve.

The legislation is now set to head to the Pennsylvania House of Representatives and, if subsequently passed and signed into law by Democratic governor Tom Wolf, would reportedly make Pennsylvania the first state to allow its casinos and lottery to offer their games online. In exchange, operators would be required to pay a $10 million upfront licensing fee while slots and table games would be subject to a 54% revenue tax, which is identical to the rate charged in land-based venues.

The Associated Press reported that the proposed legislation would additionally legalize and establish a tax regime for daily fantasy sports, authorize online gambling parlors in airports and revive the casino host fee requirement struck down by the Pennsylvania Supreme Court last year while setting the revenue tax rate for peer-to-peer games such as poker at 16%.

The Pennsylvania State Senate reportedly estimated that the legislation could see the state bring in more than $100 million next year to help alleviate a nearly $3 billion historical budget deficit and assist in the funding of a variety of programs including those for the elderly.

The Associated Press reported that the Pennsylvania Lottery is this year expected to post its first annual drop in overall revenues for almost a decade while Pennsylvania State Senator Jay Costa told the news service that capturing the attention of those who want to wager online is critical to sustaining the lottery fund.

“To not have those folks, we lose business along those lines but, more importantly, we lose an opportunity, an opportunity to have people who would be playing in that space,” Costa told the Associated Press.

As background, the Associated Press reported that online casino gambling is currently only legal in the states of New Jersey, Delaware, and Nevada while Georgia, Kentucky, Illinois, and Michigan allow residents to play lottery games over the Internet.