Rick Perry, who has been governor of Texas for 14 years, controls nearly everything in the Lone Star State—except an all-important, state-funded entity called the Public Integrity Unit, which investigates corruption of public officials.

It was Perry’s threat to veto funding for the unit that resulted in his indictment on felony charges of abuse of power and coercion of a public official. While national conservatives and liberals in the media knit themselves into a bipartisan blanket of support for Perry, it seems worthwhile to consider whether Perry really just wanted to dismantle the Public Integrity Unit, and whether the arrest and public humiliation of a high-ranking Democrat was merely his opportunity to do so.

The Public Integrity Unit was created in the early 1980s by Democrat Ronnie Earle, the district attorney in blue Travis County, after he launched an investigation into the state comptroller, Democrat Bob Bullock, over his expense reports. Bullock, according to Esquire, did not take kindly to the prodding, and one evening in a bar “flashed a pistol and said he was going to track Earle down and shoot him.” Earle used the incident as leverage to get funding for the unit, and Bullock went on to serve as George W. Bush’s lieutenant governor.

Earle gleefully went after members of his own party—he has reportedly estimated that out of the 19 elected officials he prosecuted, just five were Republicans—and then in 1993, he indicted a prominent member of the GOP: United States Sen. Kay Bailey Hutchison, who had been using state phones for campaign purposes—a minor infraction, but nonetheless illegal. With that case Earle made an enemy of Karl Rove, who consulted Hutchison, but it wasn’t until more than a decade later that Earle grabbed a scalp that seemed to set the Texas GOP off. In 2005, Rep. Tom DeLay was indicted by the unit for alleged campaign finance violations and forced to step down as House majority leader. (He later got his conviction overturned.)

“Since 2005, Republicans have either tried to cut funding or shift the power to the attorney general’s office,” a spokesman for the Texas Democratic Party told The Daily Beast. Shifting the power to the attorney general, Republican Greg Abbott, would, yes, place the Unit in GOP hands – but Republicans in favor of such a move say it's really about making sure that the Public Integrity Unit is in state hands rather than the hands of a single county.

Republican state Sen. Dan Patrick introduced a proposal in 2007 which would have established a statewide Public Integrity Unit under the control of Abbott. And in 2011, after Earle had resigned and another Democrat, Rosemary Lehmberg, had replaced him, state Rep. Bill Zedler, another Republican, brought a similar proposal. These efforts and others like them were unsuccessful, and the Travis County Public Integrity Unit remained the only such entity to receive funding from the state.

Then things seemed to get personal for Perry.

One of Perry’s central achievements as governor was the creation of the Cancer Research and Prevention Institute (CPRIT), a taxpayer-funded project that doled out research grants to startups seeking to cure cancer. But when it was revealed that that much of the $3 billion intended for the startups was going to Perry’s campaign donors, it looked like Perry's crowning accomplishment had been tarnished. Jerry Cobbs, a high-ranking CPRIT official, was found to have been unlawfully award an $11 million grant – he was indicted by the Public Integrity Unit.

With the CPRIT investigation ongoing, Lehmberg got into trouble of her own - and it seemed Perry was trying to capitalize on it.

Caught drinking and driving, the district attorney had begun berating her arresting officers. When they brought her in, they videotaped her, strapped her to a restraining chair, and put a white mask over her head. When news of the DUI and the video became public, calls for Lehmberg’s resignation mounted. But if she relinquished control of the DA’s office and the Public Integrity Unit, Perry would get to install one of his people in her place.

Perry publicly threatened that if Lehmberg did not resign, he would make devastating cuts to the Public Integrity Unit. When she held onto her post, Perry followed through, slashing $7.5 million of funding over two years. The cuts, according to Perry’s critics, were a “huge blow” to the agency, which was dealing with a heavy load of cases in addition to the CPRIT investigation.

Perry, as noted by The Daily Beast’s Dean Obeidallah, has assembled a team of high-powered lawyers to protect him, two of them from Washington, D.C. And his team seems keenly aware of the importance of quashing concerns about a link between CPRIT and Perry’s defunding of the Public Integrity Unit.

On Thursday, Perry’s lawyers released an affidavit from Chris Walling, a former Travis County investigator who was part of the CPRIT investigation, stating that Perry was not a target of that probe.

“The CPRIT issue is important to the Democrats to try to say there was something there,” Brian Ginsberg, one of Perry’s defense attorneys, told reporters on Thursday. But mentioning CPRIT is an unnecessary dredging up of the past, Ginsberg told The Daily Beast: “If they want to bring up a bunch of bad history to try to justify the unjustifiable, I guess that’s their right.” He added, “It’s a red herring.”

But Democrats are asking why, if the only motivation for cutting funds to the Public Integrity Unit was Lehmberg’s lack of integrity, Perry didn’t condemn similar behavior in others. In 2003, Swisher County DA Terry McEachern was convicted of a DUI; in 2009, Kaufman County DA Rick Harrison was found guilty of drunk driving after going the wrong way. Asked why Perry did not request the resignations of either man, a spokeswoman for the governor, Lucy Nashed, told The Daily Beast: “Neither of these individuals oversaw the Public Integrity Unit, which receives state taxpayer dollars, and we have no evidence that either of them behaved inappropriately or abusively to law enforcement when they were arrested.”

Perhaps unsurprisingly, given his status as the proverbial ham sandwich, DeLay has surfaced in the wake of Perry’s indictment to offer his opinion. “This is what they do. This is how they intimidate the elected officials in the state legislature and the governor and around the state,” he told Fox News. “For nine years I’ve been warning the Republicans that if they don’t reform this unit and put it on a statewide basis with the attorney general, that they could be next. And he we go, Rick Perry was next.”