DENTON — A state district judge Wednesday dismissed a ruling from the Texas Ethics Commission that found conservative powerbroker Michael Quinn Sullivan violated state law by failing to register as a lobbyist, handing the Empower Texans leader a victory in a long-simmering dispute with regulators.

Judge Steve Burgess ruled after a four-hour hearing that a state law put in place to protect free speech and the right to assemble applied to Sullivan. A lawyer for the commission said that an appeal is likely.

“It is significant that on the very first day that a court had the opportunity to look at this situation … the judge dismissed it,” Sullivan said outside the courthouse. “That’s indicative of where this case was all along. The Texas Ethics Commission has devolved into an agency in which the process is the punishment.”

The commission and Sullivan have been sparring over the lobby registration issue since 2012, when state officials launched a probe after sworn complaints by state Rep. Jim Keffer, R-Eastland, and former state Rep. Vicki Truitt, R-Keller, accused Sullivan of directly lobbying members of the Texas House in the last quarter of 2010 and during the 2011 session and failing to register with the state.

The commission fined Sullivan in late July after he was found to have flouted state law for failing to register. Sullivan appealed in August as part of what is known as a de novo review — a process in which the commission’s final decision is vacated and its findings are disregarded.

As part of the process, Sullivan chose to have the appeal play out in Denton, as opposed to the traditionally liberal Travis County, claiming the North Texas county as his residence. The commission tried to have the case transferred to Travis County, but Burgess reluctantly ruled earlier in the hearing that Sullivan was a Denton resident based on affidavits submitted in the court file, paving a path for him to rule on a motion to dismiss the case later in the day.

For the last three years, the sparring between Sullivan and the commission has been closely watched by legislators and lobbyists in the Austin bubble.

Sullivan is the state’s most prominent conservative activist, heading up the politically active 501(C)(4) Empower Texans and its political action committee, which spent more than $4 million in 2014, according to state data. The commission had ruled that he spent portions of 2010 and 2011 trying to influence lawmakers and legislative staffers without ever declaring himself to the state as one of the Capitol’s official influence peddlers.

Wednesday’s ruling marks a major blow for the commission, which has waged its most aggressive investigation to date in the Sullivan case. Over the course of the last year alone, the commission held a feisty 12-hour marathon hearing, shunned defense from the state attorney general’s office and hired outside lawyers and recently contracted with a private investigator to dig through public records and spy on Sullivan to determine if he was actually living in Denton.

Burgess spent the better portion of the hearing plowing through hundreds of pages of documents, while the courtroom sat in silence. Sullivan’s lawyers have been arguing that he is exempt from the state’s lobby laws because his mailing list of more than 100,000 subscribers qualifies him as “bona fide” media. At one point, Burgess declared, “it’s hard to figure out how Mr. Sullivan is not in the media business.” But the judge did not rule on the media exemption.

In the end, Burgess relied on his reading of the Texas Citizen Participation Act, a law passed in 2011 and strengthened in 2013 that provides a fast track to have lawsuits dismissed against people exercising free speech rights on matters of public concern.

“Bottom line,” Burgess said is that the law “applies to the situation,” at hand.

Joe Nixon, a lawyer defending Sullivan, said the commission came after his client because he “chose to speak out politically,” noting the law was drafted broadly by the Legislature to afford maximum protection of political speech.

But commission lawyers fired back that Sullivan’s lawyers were misapplying the law and abundant pile of evidence existed showing Sullivan directly tried to influence votes on legislation.

“It is inaccurate to say we sued Sullivan for speaking out politically. We are not seeking damage or trying to silence him,” said Gretchen Sween, a lawyer representing the commission, adding that state regulators simply fined him for not comply with lobby laws.

Sullivans lawyers are now seeking about $170,000 in attorneys fees.

Appeals of a state ethics ruling are extremely rare, as most who are fined choose to settle long before waging court fights. But Sullivan’s appeal marks the second in which a commission ruling was tossed entirely after moving the venue outside of Travis County. Former state Rep. Toby Goodman was fined $10,000 in 2008 for violating campaign finance laws and had the case overturned in Tarrant County court.