Last May, things looked so bleak in the Texas oil patch that the service company Halliburton decided to write a $3.5 billion check to get out of a planned merger with its major rival, Baker Hughes. The deal had made some sense when it was signed, in November 2014, but a year and a half later the companies’ rationale fell apart as crude oil prices experienced a precipitous, months-long slide. The merger’s demise was just one of many indications that the oil and gas sector was in the midst of its worst bust in three decades. In Texas, the average number of active rigs had plunged from nine hundred at the boom’s peak to fewer than two hundred. Companies slashed tens of thousands of jobs, and bankruptcies were rising. In Irving, the world’s biggest oil company, ExxonMobil, posted anemic profits.

But as 2017 begins, the outlook is radically different. Prices seem to have stabilized (albeit at half their mid-2014 level), and Donald Trump has tapped two prominent Texans with deep energy-industry ties for his Cabinet. Pending their respective confirmations (which had not been completed when this piece published), ExxonMobil chairman and CEO Rex Tillerson will be our next secretary of state, and former governor Rick Perry will run the Department of Energy. And an almost-Texan—Oklahoma attorney general Scott Pruitt—has been nominated as administrator of the Environmental Protection Agency, where he would likely pursue a pro-oil agenda. After eight years of the cold shoulder, fossil fuels are back in vogue in Washington. “It’s a complete U-turn from the previous administration,” says Craig Pirrong, the director of the University of Houston’s Global Energy Management Institute.

Of all Trump’s appointees, none was more surprising than Tillerson, who has spent his entire 41-year career at ExxonMobil. The Wichita Falls native and University of Texas grad is known for his diplomatic skills; his crowning achievement was negotiating Exxon’s 1996 agreement to drill for oil off Russia’s eastern coast. The challenge for Tillerson will be in translating his skill at negotiating business deals into the broader foreign-policy imperatives that traditionally drive a secretary of state. Convincing Vladimir Putin that your company has the technical and financial wherewithal to pull millions of gallons of crude out of the ground isn’t the same thing as trying to convince him not to send troops into Ukraine. “That challenge is very different from those involved in representing Exxon’s interests, even if when doing so Rex was talking to many of the same types of people,” one former Exxon executive says.

And, of course, many observers worry that both Trump and Tillerson are simply too close to the Russians to bring pressure to bear. Trump has said he doesn’t think the U.S. has “a right to lecture” countries such as Russia on human rights, and Tillerson has long opposed bringing economic sanctions against Russia. At Exxon he also struck deals with brutal regimes in Saudi Arabia, Qatar, and Angola. That sort of hands-off approach will almost certainly benefit Texas oil companies with international drilling operations.

While Tillerson may be an unusual pick, Perry is a fairly standard one for a Republican president. He has long been a friend of the energy sector; the industry gave more than $2.5 million to his two presidential campaigns. As a Cabinet member, Perry could use his influence to repay his supporters. “He’ll be another sympathetic ear in Washington regulatory circles,” Pirrong says.

Perry claims credit for the drilling boom that fed state coffers for much of his tenure as governor, but the rise of hydraulic fracturing had little to do with him. In fact, Perry’s biggest energy policy moves were directed at renewables, not oil and gas. Under Perry, Texas became the country’s biggest wind energy–producing state. He was also a major supporter of the state’s $7 billion investment in 3,600 miles of high-voltage transmission lines for moving wind-generated electricity from West Texas and the Panhandle to cities like Dallas and San Antonio.

Conservatives don’t usually sing the praises of renewable energy, but Trump and Perry will likely maintain federal subsidies for wind power, given the strong presence of wind energy in states that supported Trump. “There are so many red states in the wind business,” says Bernard Weinstein, the associate director of Southern Methodist University’s Maguire Energy Institute. “They love their wind subsidies. I don’t think those are going away.”

Perry’s wind energy support, however, wasn’t about making Texas greener. He touted it as a jobs creator and, at the same time, advocated for new coal-fired generating plants. His support for coal fits well with Trump’s vow to lift many of the environmental restrictions on coal plants that were enacted by President Obama. The problem for Texas is that it’s not coal country, and propping up coal would come at the expense of natural gas, which has been at the heart of the Texas energy boom. Thanks to increased production from fracking, burning gas is now a cheaper way to generate electricity than burning coal.

Trump may find it difficult to reverse that trend. After all, companies have made big investments in natural gas and the market favors it. More importantly, Trump has called for strengthening U.S. manufacturing, and cheap natural gas is attractive to factories that use it for heating and powering machinery. Along the Gulf Coast, petrochemical makers have moved jobs here from the Middle East because they rely on cheap gas as a raw material for plastics and other products. As much as Trump owes to out-of-work coal miners in Appalachia, the interests of the Houston energy sector will likely come out on top.

Many of the changes Trump will preside over will fall under the EPA’s purview, and the selection of Pruitt, a fracking proponent and climate change skeptic, sends a clear message that the green dreams of the Obama years are over. “The EPA has been adversarial to the industry, and we now have somebody who’s been adversarial to the EPA,” Pirrong says. The list of regulations that will likely fall by the wayside is extremely long. Last year, for instance, the Obama administration set the first-ever limits on methane emissions from oil and gas wells, a move that was opposed by Texas energy companies and pipeline operators. Expect those limits to be eliminated soon after Trump takes office.

Big pipeline companies like Houston’s Kinder Morgan and Dallas’s Energy Transfer Partners will probably be among the first benefactors of Trump’s regulatory changes. Pipelines have become the cause célèbre of environmental groups, which have succeeded in blocking the Keystone XL and Dakota Access lines in North Dakota. During the campaign, Trump vowed to revive the Keystone project, which crosses the Canadian border and requires State Department approval. Tillerson supports the project, which would help Texas refiners by bringing more cheap domestic and Canadian crude to the Gulf Coast.

Trump also supports completion of the Dakota Access Pipeline, which Energy Transfer was building until the U.S. Army Corps of Engineers rejected its easement request in December. Fortunately for the company, it is well connected to the new administration. Perry, who is in line to oversee the agency that approves pipeline permits, was on the company’s board of directors, though he resigned in January, in keeping with ethics rules. As of last summer, financial disclosures showed Trump owned as much as $50,000 of Energy Transfer stock, though a Trump spokeswoman said after the election that he had sold his stake. And Energy Transfer CEO Kelcy Warren gave $100,000 to Trump’s joint fund-raising program with the Republican party, and both he and the company were major contributors to Perry as well.

In addition to cutting red tape for proposed pipelines, Trump has called for more drilling on federal lands and expanding tax incentives for companies to develop domestic energy reserves. Less than 2 percent of Texas’s 268,000 square miles is federally owned, so relaxing drilling restrictions on them will have little direct impact here. But Texas companies that drill in Western states such as Colorado could gain access to more potential reserves. Regardless of available land and tax incentives, though, wells still must be economical, and at current prices many domestic drilling programs aren’t profitable. “Tax breaks are not the deciding factor,” says William Arnold, a professor of energy management at Rice University. “People aren’t going to drill because the president says to.”

For all the changes the new president will bring, the biggest gift the Texas oil patch has recently received has nothing to do with the new administration. In late November OPEC announced its first production cut in eight years and convinced the Russians to join in. This was an about-face from the cartel’s move in 2014, when it saturated the global market, driving prices down to less than $30 a barrel. OPEC’s strategy was designed to put American frackers out of business, but U.S. production—especially in the Permian Basin—has remained resilient. As a result, the cartel decided to put a floor on prices, which will help producers from the Middle East to Midland. “What OPEC does has a bigger effect than policy changes or tax incentives,” Weinstein says. Oil prices jumped above $50 a barrel and stayed there the rest of the year.

Texas drillers didn’t waste any time reacting to the news. The number of active rigs working in the state jumped to 324 by the end of December, from 279 a month earlier. That doesn’t mean oil companies are out of the woods. More than 220 have gone bankrupt since 2014, and as of September another 135 were still in financial trouble. And, of course, OPEC members have a habit of violating production agreements, as does Russia. But for now, higher prices will help struggling companies and reassure investors that the worst of the bust may be over. As if to drive home the point, a day after OPEC’s announcement, BP (which is headquartered in London but runs its North American operations from Houston) said it would go ahead with a $9 billion investment in the second phase of its Mad Dog oil field, in the Gulf.

Most oil companies would doubtless rather see prices return to the $100-plus days of mid-2014. But they’re learning to live with $50. After being jilted by Halliburton, Baker Hughes struck a deal to combine its assets with General Electric’s oil and gas operations. The new entity is designed to weather fluctuations in oil prices, but it’s also poised to capitalize on a rebound. All it has to do is wait for Trump and his team of Texans to make it happen.