After more than a year of defying the state legislature, the Texas Racing Commission finally, sort of, caved in on Thursday.

After being deadlocked on whether to allow historical racing to remain on the commission’s books back in December, this time around, Texas Comptroller Glenn Hegar weighed in and helped end the long battle between the state legislature and the racing commission.

The commission voted 5 to 4 to repeal historical racing.

The vote comes after months of contentious back-and-forth between those in the horse-racing industry, some racing commissioners and the Legislative Budget Board.

State lawmakers have long insisted that historical racing, in which people bet on races that are shown on video with all the identifying information about the race removed, is actually an expansion of gambling, which many Legislative Budget Board members and other state legislators are firmly against for whatever reason. (Actually, the main reasons seem to be a mix of religion and highly effective casino lobbyists from neighboring states.)

It all started, of course, with a vote. In August 2014, the Texas Racing Commission voted 7-1 to approve historical racing for the state. The decision was met with rabid enthusiasm from the Texas horse-racing industry. 

Texas thoroughbred horse racing returned to the state after the 50-year ban on parimutuel wagering ended in the 1990s. For a brief period, the Texas horse-racing industry boomed, but in recent years race attendance has declined. While some states, like Louisiana, prop up their thoroughbred horse-racing industry with fat purses drawn from racetrack casinos, Texas racetracks didn’t (and still don’t) have that option.

Dwindling crowds forced officials at Sam Houston Race Park and other Texas tracks to choose between offering more races with smaller purses or offering the larger purses that tend to draw the better jockeys and horses in the industry. Soon the top horses and trainers, even the trainers who started out in Texas, had stopped bringing the good horses to the Texas racing circuit and the quality of the races started a swift decline.

But there was a problem with that 2014 decision. Namely, some state legislators were rather displeased that the racing commission had voted to allow historic racing without getting the state legislature to sign off on the decision, as we’ve previously reported. In fact, a group of legislators quickly started to insist that the TRC didn’t have the authority to make such a decision. Things rapidly deteriorated from there.

Once the biennial legislative session convened in 2015, state lawmakers went after the “rogue” commission. First some legislators tried to actually dissolve the Texas Racing Commission — to obliterate that which had offended — but their efforts failed.  When that didn’t work, the Legislative Budget Board simply refused to give the commission, well, a budget. 

The standoff dragged on throughout 2015. The Texas Racing Commission met again in August and once more voted to approve historic racing, even though its funding was set to run out as of September 1. When that day arrived, the legislature had been unable to agree on a deal, so the Texas Racing Commission announced it was shutting its doors. 

A day later, the Lege gave the commission a sort of reprieve, agreeing to fund the commission through November and then, as November rolled around, through the end of February. When the Legislative Budget Board announced the extension, it was made clear that the funding would stop entirely and the Texas racing season would come to an abrupt halt if historical racing wasn’t wiped off the commission’s books by February 29.

In the meantime, the commissioners met again in December. Once again they voted on whether to allow historic racing, and once again, this time in a 4-4 vote, they kept it.  

The commissioners were basically daring the Lege to cut off funding to a $5.5 million industry that employs more than 36,000 people in the state. As the February deadline approached, the commission seemed to remain staunchly defiant. But that was about the time when Hegar got involved.

Hegar has a seat on the commission because he holds the comptroller’s office. Normally, this is just a formality and the comptroller doesn’t, you know, vote on commission issues.  But the Texas Horsemen’s Association filed a lawsuit against Hegar because his office was withholding funds from the commission because of the kerfuffle over historical racing.

The commission was scheduled to vote on historical racing February 9, but another lawsuit, this one about the Texas Greyhound Association, resulted in a temporary restraining order that stopped the commission from voting last week. A hearing on the restraining order was scheduled for Thursday morning in Brownsville, but the plaintiffs dropped the whole thing. The Texas Horsemen’s Association put in a separate request for a temporary restraining order, asking the Third Court of Appeals to step in, but that request was rejected.

So, with all the legal fetters off, on Thursday the commission took the opportunity to go ahead and vote on historical racing one more time.

Shortly before the vote, Rolando Pablos, commission chairman, tried to put a positive spin on what was about to happen. “We’re trying to find solutions here,” Pablos said, according to the Texas Tribune. “We have the power to press the reset button, get together and find solutions that are not this controversial. Certainly, I think we need to move forward. By repealing the rules, we are helping the industry in the short term.”

This time around, there was one major difference with the commission: Hegar sent a stand-in, Victoria North, to the meeting. She voted to repeal historical racing, and that was that.

(This works out well for Hegar since it truly killed two birds with one stone. Historical racing has been repealed and that means the lawsuit against Hegar’s office for withholding TRC funds is moot, according to the Texas Tribune.)

Now the major opponents of historical racing are probably celebrating their win. Lt Gov. Dan Patrick and state Senate Finance Committee Chairwoman Jane Nelson in particular — both are on the Legislative Budget Board and both have been vehemently against historical racing since it first came up in 2014 — are likely doing a little victory strutting right now.

Meanwhile, the Texas racing industry is clearly bummed.

“Today’s vote was brought about because of extreme pressure placed on commissioners by a small handful of Senate leaders with threats to shut down the agency if historical racing wasn’t repealed,” according to a statement from the Texas Horsemen’s Partnership.

On the upside, there’s very little that has to be done now that the commission has (sort of) caved and repealed historical racing. Despite the protracted fight over historical racing, none of the machines were ever actually installed at any of the Texas racetracks.