On September 25, in a nonbinding referendum, the people of Iraqi Kurdistan voted overwhelmingly in favor of independence. The critical international response to the referendum has cast additional uncertainty over the future of the region. Kurdistan’s prospects had already taken a hit in recent years as its security situation deteriorated, the price of oil plummeted, and concern over Kurdish legal authority over their energy resources grew.

In the years after the end of major U.S. combat operations in Iraq, a number of Texas-based companies played important roles in developing Kurdistan’s energy resources and infrastructure. In 2011, Exxon signed a production sharing agreement with the Kurdish Regional Government (KRG) against the wishes of both Baghdad and Washington.

A year later, a single well in the Atrush exploration block was tested at a flow rate of 42,000 barrels of oil a day, an order of magnitude more production than the average new well in the Eagle Ford and Permian shale plays in Texas (which typically produce 500 to 1,500 barrels a day). Two of the biggest stakeholders in the Atrush field were Houston-based Marathon Oil and Aspect Holdings, an independent exploration and investment company whose CEO, Alex Cranberg, has recently served on the board of regents for the University of Texas System.

During the years that followed the Atrush gusher, the price of oil bounced around $100 a barrel. And while the rest of Iraq was beset by corruption and civil unrest, Kurdistan was developing a reputation as a stable and reliable business partner. That equation changed in 2014, when ISIS took over large swaths of Iraq, most notably Mosul, a large city in northern Iraq only an hour and a half from Erbil by car.

Over the next few months, foreign oil workers were evacuated from Erbil, and the price of oil began its precipitous fall from a summer peak, in June 2014, of more than $100 a barrel to less than $60 a barrel by the end of the year. Adding insult to injury, a dispute between Baghdad and Erbil over a tanker full of Kurdish oil made its way to a Houston courtroom, casting doubt upon Kurdistan’s authority to export oil without Baghdad’s consent. As the prospects for Kurdish energy went from bad to worse, Exxon and other major international oil companies ultimately relinquished their assets in Kurdistan.

Despite these setbacks, the Kurds made oily lemonade out of a barrage of lemons. As the Iraqi security forces retreated from northern Iraq and ISIS moved on Baghdad, Kurdish military forces occupied Kirkuk, a long-disputed multi-ethnic city and the source of more than 10 percent of Iraqi oil production. The Kurds took control of much of the oil production around Kirkuk and connected the newly acquired fields to a Kurdish-controlled pipeline to Turkey.

As a result, the Kurds have significantly increased their control over oil production and exports in northern Iraq in the last few years. By the time of the referendum, Iraqi Kurdistan was independently exporting nearly 600,000 barrels of oil a day, enough to account for 80 percent of the KRG’s revenue. It is in the light of these developments that long-time KRG president Masoud Barzani scheduled the referendum on Kurdish independence from Iraq.

The immediate effect of the referendum has been international condemnation and internal tension. Secretary of State Rex Tillerson declared the referendum to be illegitimate and maintained that the U.S. supports a “united . . . and prosperous Iraq.” The Iraqi government and its neighbors Turkey and Iran, both of which are wary of their own Kurdish populations pushing for increased autonomy, have threatened joint action to shut down Kurdish oil exports, most of which have to flow through Turkey to get to international markets.

Baghdad has also announced plans to reopen the Kirkuk-Ceyhan pipeline to regain some control over oil exports from Kirkuk to Turkey. Complicating matters further, occupied Kirkuk could erupt into sectarian violence, some observers worry. Were that to happen, Kurdish oil exports could decline significantly, regardless of how other regional powers respond to the referendum. Speculation about decreased Kurdish oil exports has influenced the recent uptick in crude prices.

These are the uncertainties that companies with interests in Kurdistan have to live with if they are to remain involved in the region. Marathon Oil has held onto its assets in the Atrush field and, six years after the drilling of the monumental test well, production from the Atrush began this summer. In May, Crest Energy, a Houston-based wholesaler and distributor of petrochemical products, bought out two production-sharing contracts in Kurdistan. Regarding the potential for newcomers to get involved in the Kurdish oil patch, Cranberg, who is no longer involved in the region, says that American and especially Texan companies are welcome, and those that enter during times of stress like today will be recognized and appreciated.

Andrew Reimers is a Ph.D. candidate in the Webber Energy Group at UT-Austin and an energy systems modeling intern at the National Renewable Energy Laboratory. His research focuses on technical and economic analysis of power generation and water treatment systems. Andrew blogs about current events related to energy and the environment at andrewreimersblog.com.