Oil firms are gushing for Trump, but he may soon be giving them headaches

Happy days are here again for the oil and gas industry – but plenty of uncertainty, too.

Fossil fuel producers are eagerly anticipating President-elect Donald Trump's promised rollback of environmental protections, his support for pipelines and other infrastructure, and perhaps an end to the international sanctions that have frozen U.S. oil investment in Russia. But the broader outlook for oil and gas markets is anything but clear.

For now the sector is enjoying a Goldilocks moment: Since hitting a record low of $26 a barrel in January, prices have been on the rise, and they've been holding steady between $50 and $60 since OPEC announced a long-awaited deal Dec. 3 to cut production.

RELATED: Iraq oil well fires

That's a range high enough to put U.S. oil workers back to work but not so high to pain consumers at the pump: U.S. rig counts have been steadily recovering from a nadir of 404 active rigs in May, according to data compiled by the oil services firm Baker Hughes. Meanwhile the nation's average gas price has held between $2.09 and $2.40 since mid-2015.

It had been dark times for oil workers: For the past year and a half, the world was awash in an oversupply of oil – a glut fueled by the U.S. shale boom, flat-out production by Saudi Arabia and sluggish economic growth in Asia, which together led to tens of thousands of layoffs of roughnecks worldwide.

Demand more recently, though, has been accelerating. Meanwhile the OPEC deal has eased output in the Middle East, and while U.S. shale producers have brought dozens of rigs back online, they still amount to only a third of the peak achieved in November 2011, meaning the oversupply is starting to shrink.

This is generally good news for oil and gas companies and their investors, and it represents a market correction that's been long overdue.

"In theory you should still see some pretty good draws on inventory heading into Q1," says Steven Kopits, managing director of the consulting firm Princeton Energy Advisors. "We should be in pretty good shape in oil markets."

But there's plenty that can change, too. The same oversupply that dropped prices to a record low earlier this year also insulated markets from the kind of disruptions that would once send investors into a panic and cause prices to soar.

"You've had bit of a supply cushion," says David Goldwyn, former special envoy and coordinator for international energy affairs for the State Department from 2009 to 2011 and president of consulting firm Goldwyn Global Strategies. "As you look out to next year, where people have decreasing supply and increasing demand, you're going to have more of those disruptions and a bigger impact on the market."

RELATED: Saudi oil company fire kills 11

These are some of the many variables that analysts are monitoring that could affect the markets:

Trade Policy

Trump has repeatedly floated the idea of imposing import tariffs, especially on goods from China, a policy that could spark a trade war.

"Oil would be bad. And for laptops and computers and TVs and electronics, it would be just a disaster," Kopits says.

Iran

Trump may try to renegotiate the nuclear deal with Iran, which could affect that country's oil production and its willingness to abide by its commitment to the OPEC deal.

Russia

The president-elect may not only lift sanctions that have blocked U.S. investment in Russia, he's also proposed joining forces with the Kremlin to combat the Islamic State group in the Middle East, military action that could have an impact on oil production.

"A new more kinetic policy on the Islamic State, which essentially licenses Russian bombing in Iraq or Syria or other places, is likely to create refugee flows and potentially disrupt production," Goldwyn says.

Asia

Trump has promised a more muscular approach to China, especially Beijing's expansionism in the South China Sea. A confrontation there – in one of the world's busiest shipping areas – would not only threaten oil exports to U.S. customers in Japan and South Korea but also disrupt transit, affect insurance rates, and impose other costs on oil and gas producers.

The Cabinet

For the top energy and environment positions in his Cabinet, Trump has selected three politicians who have cast doubt on human-induced climate change and opposed federal environmental regulations: Oklahoma Attorney General Scott Pruitt would lead the Environmental Protection Agency, former Texas Gov. Rick Perry would head the Energy Department, and Montana Rep. Ryan Zinke would oversee the Interior Department. Meanwhile, for Secretary of State, Trump has tapped ExxonMobil Chairman and CEO Rex Tillerson.

Of Tillerson, the executive's supporters say he's a dealmaker – a savvy business leader who's been adept at working with both democracies and autocracies and who is well-acquainted with what OPEC Secretary General Mohammad Barkindo called the "very thin line between oil, geopolitics and diplomacy." To left-leaning lawmakers, environmental advocates and policymakers overseas, however, his selection raises questions about whether the career oil man can put the interests of the country ahead of the interests of the industry.

RELATED: Trump's official picks for cabinet and administration positions

Regulations

Trump has said he'd undo a number of environmental protections that his predecessor enacted through executive authority, from the EPA's Clean Power Plan – the nation's first nationwide emissions limits for existing power plants – to prohibitions on drilling offshore and in the Arctic, to fracking regulations for oil and gas operations on federal lands.

These rollbacks would likely have little direct impact on the oil and gas sector: Access to potential oil reserves is not one of the challenges the industry has recently had to face, as demonstrated by the sweeping success of the shale boom. And while scrapping the regulations may reduce costs by removing certain regulations the industry might otherwise have had to comply with, they may spark other disruptions: namely protests.

Goldwyn calls this the "Keystone effect," referring to the pipeline project that became a flashpoint and outsize symbol of environmental opposition to oil and gas investment. After Obama's effort to introduce a nationwide cap-and-trade system to reduce carbon emissions failed in Congress in 2009, environmental groups were left with few options except to protest. Under a Trump administration, one in which the proposed EPA and Energy Department chiefs are similarly unsympathetic, protest may become the only recourse at the federal level.

"The challenge for companies to permit their infrastructure is going to increase rather than decrease under a Trump administration," Goldwyn says. But, he adds, that impact may ultimately prove marginal.

"Any of the liberalizations in access to lands will not impact markets for years to come," he says. "The real impact that Trump could have on oil and gas markets will come from geopolitical steps or missteps he may or may not make."