If Florida needed any proof that it is slowly and steadily lurching forward into becoming a massive gambling state, “they couldn’t have scripted it any better than the last 48 hours,’’ said Rep. Erik Fresen, R-Miami, one of two sponsors of the bill to create a new gaming regulatory agency and bring “destination resort” casinos to Florida.

Using a provision in a 2009 law intended to give slot machines to Hialeah Racetrack, the Gretna County Commission voted on Tuesday to hold a referendum to allow for slot machines to be installed at the Panhandle county’s brand new race track designed for barrel racing. That followed a decision by the Florida Division of Parimutuel Wagering last Friday to offer a second jai alai permit to Magic City Casino that could lead to a second slot machine license for them.

The Gretna referendum, to be held during the Jan. 31 presidential preference primary, will ask voters to authorize the Las Vegas style games and, with that, allow the track’s owners to apply for a slots permit. The Gretna Casino is primarily owned by the Alabama-based Poarch Band of Creek Indians along with two Tallahassee gambling lawyers and lobbyists.

If voters approve the referendum, the owners could run barrel races for two consecutive days over New Year’s Eve and New Year’s Day and the company could apply for a slots license.

Will the state be required to give them one? The legal opinions are mixed.

“A lot of people feel from a legal analysis standpoint that there’s a 50-50 shot that it stands,’’ said Sen. Ellyn Bogdanoff, R-Fort Lauderdale, at a briefing with reporters Thursday.

“There’s another legal opinion out there that we can expand gaming without any additional constitutional authority.’’

Two days after the Gadsden County vote, the Quarterhorse Racing Association filed an administrative challenge arguing that the Gretna barrel racing permit is illegal and the referendum unauthorized. They are hoping to stop the vote.

All these developments, Fresen and Bogdanoff say, are why they want to impose strict new regulatory controls over gambling expansion in Florida. “It becomes more critical,’’ Bogdanoff said. Their plan is to create a Florida Gaming Commission, a new state agency that she said would close all loopholes and regulate all gaming and supply a “strategic direction” to Florida’s hodge podge of gaming law.

But, she added, the political realities are such that such a bill can’t pass alone and the vehicle to do is the creation of three “destination resorts’’ casinos designed to attract mega conventions, entertainment, restaurants and international tourists.

“If we had written the script, we probably couldn’t have written it better than what happened over the last few days, which is the Gadsden County referendum and the issue of the additional permit for Jai Alai in Miami,'' Bogdanoff said.

“Gaming is going to continue to expand unless we wake in the legislature and recognize where we are as a gaming state and actually work to harness it, control it, regulate it and decide what we want to be when we grow up as a gaming state."

Much of it began years ago.

Sitting in the basement of Tallahassee’s R.A. Gray building, paging through boxes of old legislative files, attorney John Lockwood stumbled upon a 1980 staff analysis that would become the latest loophole in Florida’s ever-shifting gambling law.

The provision allowed for any pari-mutuel that had the lowest yearly handle, (total amount wagered,) in a given county to be eligible for a summer jai alai permit.

To his client, West Flagler Inc. which owns Magic City Casino and the Flagler Dog Track, the jai alai permit on its own wasn’t all that useful. The company already holds a summer permit to operate jai alai games and poker rooms.

But, coupled with a 2009 law that allows for pari-mutuels in Miami Dade and Broward counties that operate over the course of two years to be eligible for a permit to operate slot machines, that gave it value.

Lockwood waited until the end of the 2010-11 season to see which pari-mutuel had the lowest handle before he and applied for the permit. By law, the state Division of Parimutuel Wagering had to offer it to Hialeah Racetrack, whose quarterhorse racing was drawing the lowest total bets. Hialeah turned it down and so the next eligible was West Flagler, Inc., because of its dog track.

“It was a Hail Mary pass,’’ Lockwood said this week. “I wanted to test the waters.”

West Flagler vice president Isadore Havenick said they have no immediate plans to seek another slot machine permit but instead want to continue to fight attempts by Hialeah Racetrack to obtain slot machines.

West Flagler and Calder Race Course are planning to appeal to the Florida Supreme Court a district court of appeal ruling that agreed with Hialeah that voters didn’t intend to limit the number of slot permits to seven when they approved referendums in Miami Dade and Broward, he said.

“We continue to believer there are only seven constitutionally-permitted facilities in Dade and Broward,’’ Havenick said this week. “We’re still not done with the court system.”

But, if the appeals court ruling stands, there willl be an opening. And that’s what riles up Fresen and Bogdanoff.

“We want to close basically all of the loopholes, including the one that just happened in Miami Dade County,’’ Bogdanoff said. “If you read this, I will tell you I applaud the attorney that figured that one out. It was pretty clever how they figured out a loophole in the law for 30 years.”

But, she added, “these are the types of things we need to address. We need a professional gaming commission that understands these complex issues and can make sure these loopholes can continue to happen.”

Bogdanoff insists she is not out to expand gaming, but provide just the opposite.

“If I could shut down the Lottery I would,’’ she said, calling it the “culprit” that started Florida’s long journey down the path of uncontrolled gambling expansion. “We can’t put the genie back in the bottle.”