It was 2006 and Texas Gov. Rick Perry was well ahead of the curve.

More than 10 years before he would be picked to serve in Donald Trump's presidential administration, he was already promising to make things great again, through the power of his government.

"Our prosperity is dependent on coming up with the next big idea that will fuel the economy of tomorrow," he told a group of businesses executives and political appointees in a speech on August 30 of that year. "That is the greatness of America, a place where entrepreneurs risk capital to make amazing ideas a reality."

It might come as some surprise that Perry's passionate comments in defense of entrepreneurialism and free markets were being made to the members of the Emerging Technology Fund, then Perry's newest and boldest step into taxpayer-funded economic development. Over the next five years, the ETF would spend more than $342 million in public money on 153 different grants and awards. At the same time, the fund came under fire from state auditors and independent fiscal watchdogs for being opaque and self-serving. It funneled money to some prominent donors of Perry's political campaigns, allowed board members to have contracts with companies applying for handouts, and funded at least one business that later declared bankruptcy.

That is the contradiction that sums up Rick Perry's time as governor of Texas. While presiding over a period of strong economic growth and claiming to be a believer in free markets, Perry stoked the furnace with taxpayer dollars and openly encouraged crony capitalism not only in state government, but local governments, too.

"If you hook a prospective employer on the line for your community," he promised in 2005 while speaking to the Texas Economic Development Council. "Give my office a call and we'll see what we can do to help reel them in."

Perry was never shy about—as his new boss might put it—the art of the deal, but some of those deals went bad. In 2007, Perry's ETF invested $2 million in Xtreme Power, a Texas-based battery manufacturer that was trying to develop large-scale energy storage technology. The company filed for bankruptcy in 2014, joining a long list of tech firms that have chased the golden goose of large-scale energy storage and public-sector handouts.

Another investor in Xtreme Power: the federal government. The U.S. Department of Energy, in 2012, gave Xtreme Power a $279,000 grant.

Now, Perry has been tapped by Trump to run the federal Department of Energy—a department Perry once famously forgot to remember that he wanted to eliminate, something he apparently now forgets. Unlike its portrayal in a recent hit television show, the Department of Energy is less of a shadowy government agency conducting research into alternate dimensions and more of a clearinghouse for millions of dollars of federal subsidies, boondoggles, and handouts.

According to the Cato Institute, the Department of Energy spent about $17 billion in 2016 on nuclear weapons research, development, and security, along with environmental cleanup of nuclear weapons sites. The other $10 billion of the department's $27 billion annual budget was spent on subsidies for everything from research into fusion energy to propping up wind and solar programs. There's no shortage of questionable spending included in the department's ledgers, and getting a grant is as easy as "vowing to expand production of energy-efficient gas furnaces." That's what Carrier, the Indiana-based air conditioning company that was the first recipient of the Trump administration's largesse, promised to do in 2013 in exchange for a $5.1 million grant from DoE, according to a National Review investigation.

A presidential administration that wants to offer taxpayer-funded bribes to American companies as a backdoor method of directing the economy would likely get a lot of use out of the Department of Energy's grant programs. Appointing someone like Perry to run the show makes sense, at least from Trump's point of view.

Michael Quinn Sullivan, president of Empower Texans, a nonprofit that advocates for fiscal responsibility from the state government, concedes that Perry is not without his flaws but argues that he is a good choice to run the Department of Energy. Sullivan points to Perry's history of holding the line on state budgets and trimming the overall size of government in Texas. Those things, not questionable spending programs like the ETF, should be the former governor's legacy, he says.

Perry's previous calls for abolishing the department are not hypocrisy to Sullivan, but rather an encouraging sign.

"I worry whenever I see cheerleaders for a government agency picked to run that agency," he told Reason in a phone interview Tuesday. "Perry is going to be much more likely to ask the questions like 'should we even be doing this?'"

Perhaps he will, but Perry didn't seem too keen on asking those questions about the ETF, and there were red flags almost from the day the fund was assembled. Board members and members of application review committees were not required to sign conflict of interest disclosure statements. Those people were the first to review a potential project and determine whether it should be awarded taxpayer money, state auditors noted in 2011. Meetings were not open to the public, and even though the ETF board was required to abide by Texas' open records law, application information was treated as confidential and was not disclosed to the public.

The lack of transparency created an environment where cronyism could thrive. One member of the ETF's advisory committee had consulting contracts with at least two recipients of ETF awards at the time that those recipients received those awards, auditors later found. Since there were no minutes of the ETF's meetings—the most basic form of public accountability expected of government bodies—the auditors couldn't determine, after the fact, whether that committee member had advocated or voted for the awards.

A Dallas Morning News investigation found that $16 million from the fund went to firms in which major Perry contributors were either investors or officers, while $27 million went to companies founded or advised by six members of the ETF advisory board.

Citing the poor results and negative reviews from the state auditor, Texas Gov. Greg Abbott shuttered the ETF program shortly after taking office in 2015.

The ETF, its funding of companies like Xtreme Energy, and its eventual shuttering amid ethical and economic concerns, is perhaps the most high profile example of the problems with Perry's view of the relationship between government and the economy. Yet it's hardly the only example of how cronyism flourished in Texas during his tenure.

Before the ETF, there was the $295 million Texas Enterprise Fund, created in 2003 during Perry's first term as governor. Texas Instruments, Vought Aircraft, Home Depot, Citgo, and Tyson Foods were among the companies that benefitted from the TEF between 2003 and 2007. Perry was so prolific in handing out subsidies to get companies to relocate to the Lone Star State that the TEF was recognized by Site Selection Magazine, a trade publication that essentially advises corporations about which governments are likely to give them the best goodies, as Texas' "not-so-secret-weapon" in landing major companies.

Sullivan called the Texas Enterprise Fund "a slush fund for corporate welfare." Those blemishes aside, he said, Perry was a strong advocate for free market policies that got government out of the way.

There's no doubt that Texas' economy has boomed over the past two decades, powering through the 2008 recession and emerging from it as one of the best states in the country to live and work. The unemployment rate in Texas peaked at 8.4 percent in mid-2009, when the national rate was hovering around 10 percent. Take a look at a chart showing the state's labor force—the measure of the number of people working—and you'd think the so-called Great Recession was a myth.

Those things happened in spite of and not because of programs such as the Emerging Technology Fund and the Texas Enterprise Fund, which were financied by a largely unseen process that drained dollars out of Texans' wallets in order to plump up favored companies' bottom lines. Perry should be—and has been—praised for his efforts to improve the underlying conditions of Texas' economy. He should also be held accountable for approving government programs that amounted to nothing more than corporate welfare.

For now we're left to wonder which version of Rick Perry will show up to run the Department of Energy. Will we get the passionate defender of free markets who cut government budgets and wanted to once abolish the federal department he's next in line to run? Or will we see more crony capitalism?