From the time he first tried to institute a travel ban in the early days of his administration, President Trump’s efforts to crack down on immigration have presented a quandary for energy producers.

On the one hand, the oil industry generally appreciates Trump’s anti-regulation stance, especially his efforts to roll back Obama-era rules enacted by the Environmental Protection Agency. But the travel ban poses a direct threat to the industry’s workforce, both present and future.

In late September, President Trump issued new travel restrictions on foreigners from countries including Iran, Libya, Syria, Venezuela, and Yemen. The latest restrictions were designed to replace earlier ones that had been struck down by the courts.

Trump tweeted that the measures were part of his “sacred obligation” to “ensure the safety and security of the American people.”

For the oil and gas industry, though, the ban is nettlesome. “The travel ban is a problem for the oil and gas industry because they’re a global industry,” says Michael Webber, deputy director of the Energy Institute at the University of Texas. “If you put restrictions on how people can move around the world, it affects how these companies operate.”

Managers may be unable to oversee workers they manage in the U.S., and supervisors may be unable to visit well sites or meet with regulators.

Recruiting new talent also may become more difficult at a time when oil and gas companies need it most. The industry has been on the hunt for young talent as many senior engineers enter retirement, sometimes referred to as “the great crew change.”

U.S. companies operating abroad almost must be prepared for retaliation. Countries targeted by Trump’s travel ban may impose similar restrictions on U.S. workers operating in those countries. “That makes life more expensive for these companies,” Webber says.

Companies fear that the ban could hurt their ability to win drilling concessions overseas and curtail investment opportunities. Earlier in the year, Iraq’s parliament called for a barring U.S. citizens from the country in response to Trump’s first attempt at a travel ban. The move, which wasn’t enacted, would have hit Irving-based ExxonMobil particularly hard. The company produces about half a million barrels of oil a day in Iraq.

And it’s not just producers. The ban itself and any retaliation by other countries could hurt oil field service companies such as Halliburton and Baker Hughes, with tens of thousands of workers in Texas.

The ban—or the threat of them—is affecting academia as well. UT has seen an enrollment decline among foreign students studying geology and petroleum engineering, Webber says, and the restrictions pose concerns for some 150 foreign students already attending the school. While the impact has been small so far, it could increase once the ban takes effect.

Oil companies themselves have said little about the ban through its different iterations this year. That may be because companies don’t want to rile Trump, who has favored easing regulations that affect the industry, from environmental restrictions to rules on offshore drilling.

Some rules, such as loosening financial reporting requirements for publicly traded oil companies, may benefit the industry, but Webber says hopes for less regulation may be misplaced. Much of the administration’s efforts to roll back environmental restrictions, for example, will benefit coal at the expense of natural gas. “I think in the end that Trump is not good for oil and gas,” he says. “Anything you do to promote coal or nuclear is bad for natural gas.”