Any day now, President Trump will sign an executive order that attempts to roll back the Clean Power Plan, the centerpiece of Barack Obama’s climate agenda and the mechanism by which America was supposed to meet its obligations under the 2016 Paris Climate Agreement. The CPP is an ambitious and byzantine regulatory scheme the Environmental Protection Agency issued in 2015. Ten days after it was unveiled, Texas and twenty-six other states, along with hundreds of private groups, filed suit against the EPA, arguing the agency had overstepped its authority. Last February, the U.S. Supreme Court granted an unprecedented stay of the new regulations pending review by a federal appeals court, which heard oral arguments on the case in September. The appellate court could issue a ruling at any time—perhaps even before Trump issues his executive order.

Whatever the court decides, Trump won’t be able to make the CPP go away simply by issuing an executive order. The EPA went through a long rulemaking process to come up with the regulations, and it could take an equally long process, including public notice and comment, to do away with them. The process would likely last at least a year, and with environmentalist groups threatening to sue the Trump administration over efforts to unwind the CPP, it could take even longer.

If it were to survive in its current form, the CPP would require states, by 2030, to cut carbon emissions from existing power plants by one third from their 2005 levels. States would have to do this primarily by shifting toward renewable sources of electricity like wind and solar, and shutting down coal-fired power plants. Such a shift would require a massive overhaul of electricity markets in many states, but especially in Texas.

Under the CPP, Texas alone would be expected to account for 18 percent of the proposed carbon reductions—that’s 18 percent of all reductions, nationwide. Of course, as the top oil-producing state and the industrial engine of the national economy, Texas produces and consumes a disproportionate share of electricity compared to other states. In fact, although its aggressive development of natural gas has made Texas more carbon efficient than the national average, Texas is still the top consumer of electricity in the United States, and leads the nation in carbon emissions. Hence it has the most to gain or lose, depending on one’s perspective, from the demise of the CPP.

Instead of regulating emissions from individual power plants, as most such regulations do, the EPA is proposing to force states to regulate their entire system of electric power generation—not just the facilities that fall under EPA regulation authorized in the Clean Air Act. For Texas, this would mean shutting down dozens of coal-fired power plants, because there would be no other way to meet the CPP’s emissions requirements. This could leave huge gaps in the state’s electrical capacity. The Electrical Reliability Council of Texas (ERCOT), which manages the state’s power grid, has warned that the CPP could cause electricity prices to rise 16 percent by 2030 and increase the grid’s unreliability. Although cheap and plentiful natural gas and the development of renewables (mostly wind) has hastened the retirement of coal-fired plants nationwide, Texas still relies on coal for about a quarter of its total generation capacity and more than 28 percent of its energy use—among the highest in the nation.

Conforming to the CPP wouldn’t just be a question of swapping out coal-fired plants for more wind turbines and solar panels. Because of the unique structure of Texas’s electricity infrastructure, the CPP would require a complete reorganization of the state’s electricity retail market and the wholesale market. And that would mean forcing the state legislature to undertake a massive restructuring of the agencies and entities charged with regulating the environment and public utilities, something critics say amounts to a federal regulatory agency commandeering our state government.

Unlike any other state, Texas has its own electric grid—and it’s huge. If Texas were an independent country, it would have the eleventh largest electricity market in the world—larger than Australia, Spain, or South Korea. ERCOT dispatches power across a grid of more than 46,500 miles of power lines covering most of Texas and serving some 24 million customers. It represents about 90 percent of the state’s electric load, which means the vast majority of electricity generated in Texas is consumed in Texas.

That, in turn, means most of Texas’s power grid doesn’t fall under federal jurisdiction. The Federal Power Act delegates regulation of electricity markets to the Federal Electric Regulatory Commission (FERC). But FERC is only allowed to regulate wholesale rates for resale of electric power between states, not for electricity that’s generated and consumed entirely within a state. In drafting regulations for power plants under the CPP, though, the EPA found a way around this, giving states the option of crafting a “state plan” to regulate carbon emission that the EPA would enforce under federal law. If a state refuses or declines to implement a plan, the EPA imposes a default federal plan.

But there’s another important reason Texas’s electricity market is different than that of most other states: it’s actually a market. Electricity isn’t something most people think about as a commodity with a price that’s traded on a market, but in Texas it is. In most states the price of electricity is set by a state regulator or commission. But in Texas, electricity producers actually compete for customers. That’s one reason electricity is cheaper here than it is in neighboring New Mexico. A long history of electricity deregulation and infrastructure investment has allowed the state’s market to succeed where others have failed.

That means there would be no way for Texas to implement a state plan that fulfilled the CPP’s requirements without a change in state law. The Texas Commission on Environmental Quality (TCEQ) regulates emissions at their source (power plants, in this case). The Public Utility Commission regulates transmission and limited portions of the wholesale and retail power markets. ERCOT manages the dispatch of electricity across the grid. No single entity could, under current state law, devise an EPA-compliant plan without going outside its purview. The TCEQ, for example, couldn’t simply dictate to ERCOT which generation sources—wind or solar instead of coal—it must use to dispatch power on a particular day.

Related to all of these concerns is the question of cost. Michael Nasi, an Austin attorney representing Texas rural electric co-ops in the lawsuit against the EPA, says the agency gave states no flexibility when it handed down mandated limits on carbon emission. By treating the power grid as a single system that can be regulated as one, the EPA effectively ordered states to shift away from coal to renewables. In theory, that might be a good way to reduce carbon emissions, but opponents of the CPP say it’s simply not possible without causing the price of electricity to skyrocket. “Even if I had no problem with the legality of the CPP, the policy embraced by it is flawed as a matter of the electric power markets,” Nasi says. “It was in no way accurately calculating the cost of a market that would work this way, and did not factor in the hard reality of how a state needs to run a grid.” During peak energy consumption hours—hot summer days in Texas, for example—the grid needs all the power it can get. Because the CPP essentially mandates that coal-fired power plants sit idle in favor of wind power during off-peak hours, Nasi explained, those coal plants will have to charge “exorbitantly high prices” to make up for lost revenue when they do come online during peak demand periods.

What’s more, by mandating the premature retirement of coal-fired plants, the EPA would create hundreds of millions of dollars in stranded debt. In the 1970s and ‘80s, electricity co-ops throughout Texas took out massive federal loans to finance the construction of coal-fired plants—a requirement under the Fuel Use Act of 1978, which prohibited the use of natural gas. (The use of coal in electric generation was actually a plank in the 1980 Democratic Party platform.) These rural co-ops would have to hike their rates dramatically to pay off that debt if the plants are closed down. “The damage would be irreparable,” says Nasi, noting that many legal observers suspect that’s why the Supreme Court issued a stay of the new regulations—something the court has never done before.

All of these policy problems will have to be ironed out no matter what Trump’s executive order says. Whatever comes of the lawsuit and future regulations, wrangling over the CPP might be missing the larger point of the future of electricity in a world where 1.3 billion people are now living without it. A growing number of people worldwide are going to burn coal no matter what the United States does. But is there a way to convince other countries to burn coal more cleanly? The Petra-Nova operation that recently came online in Houston is one example of how the United States might lead the way. Petra-Nova captures about ninety percent of the carbon released by a coal-fired power plant owned by NRG Energy, one of the country’s largest power companies. The carbon is compressed into liquid form and sent eighty miles southwest via pipeline to be injected into depleted oil wells, forcing remaining oil to the surface. The project cost approximately $1 billion, but by partnering with Houston-based Hilcorp Energy, NRG believes the project will eventually pay for itself. If the United States can figure out a way to export such projects to developing countries and commercialize carbon capture in a way that doesn’t drive up the cost of electricity, it might do more to reduce carbon emissions than a blunt instrument like the CPP ever could.

There is also a big question about what effect the CPP would really have globally, even if it were implemented. Charles McConnell, former Assistant Secretary of Energy in the Obama administration and now the executive director of Rice University’s Energy and Environment Initiative, never thought the CPP, by itself, was a viable idea for reducing carbon emissions. Last May, he told a Congressional subcommittee that the plan is “not an environmental regulation, it is energy regulation,” which he characterized as “all pain, no gain.” Not only would the plan result in “double-digit electricity price increases in over half of our states,” he noted, but a year’s worth of carbon emissions reduction in the year 2025 would be offset by Chinese carbon emissions in just three weeks.

For Texas, the fate of the CPP is just one piece of this larger puzzle. If the world is going to keep using coal, what role should Texas play in its future? Should it restructure state agencies and reconfigure its power grid to try to meet EPA emission guidelines under the CPP, or whatever replaces it? Or should Texas work toward exporting the carbon capture technology of Petra-Nova to developing countries? Can it do both? If the CPP is a bridge too far, Texas has already shown how to expand the use of renewables. Under former Gov. Rick Perry, now Trump’s newly-minted Secretary of Energy, Texas undertook a massive expansion of wind energy. Texas now has more wind capacity than any other state—and more than all but five countries. Perhaps the biggest question facing Perry is whether he can convince his boss that investment in carbon capture technology, like the investments Texas made in wind, should become a fundamental tenet of America’s energy policy.