A decade ago, North Dakota was a wind-swept also-ran in the oil industry. Wildcatters struck oil there in the 1950s, but the rock was too dense to get most of it out, and the fields never amounted to much. The state produced about 30 million barrels of oil in 2004, enough to satisfy U.S. demand for about a day and a half.

Then everything changed. In the mid-2000s, companies in Texas had figured out how to extract natural gas from dense shale rock near Fort Worth. A few enterprising oil men figured the same approach might work in North Dakota’s oil fields, and after a few false starts, they proved correct. Between 2004 and 2008, North Dakota’s oil production doubled. Then it doubled again. And again. This month, the Energy Information Administration said North Dakota produced 30 million barrels of oil in April — as much as it had in all of 2004.

That kind of growth is nearly unprecedented in the modern oil industry. It’s also unsustainable. If North Dakota continued its recent pattern of exponential growth, the state would be producing more than 400 million barrels of oil per month a decade from now — more than what the entire U.S. produces today. Even at a linear rate of growth, monthly production would top 100 million barrels within the next decade, more than what Texas — a state with 2.5 times the total oil reserves — produces now. Growth has to slow eventually. The question is when.

The issue isn’t whether North Dakota will run out of oil. There’s little doubt that the Bakken Shale, North Dakota’s main oil-producing reservoir, contains billions of barrels of crude. The question is about getting it out. A well’s production rate — how much oil it pumps in a given amount of time — falls quickly, and wells drilled into shale rock like the Bakken decline especially fast, as much as 70 percent in the first year. That means oil production is a treadmill: Companies have to keep drilling just to keep production flat. The more they produce, the more they have to drill to keep up.

The Energy Information Administration, the statistics arm of the U.S. Department of Energy, estimates oil production in the Bakken will keep rising until about 2020, then plateau for a few years before beginning a gradual decline. But North Dakota’s oil boom has consistently defied expectations in recent years, and the EIA acknowledges that its projections are subject to tremendous uncertainty.

In theory, forecasting an oil field’s production requires knowing just three variables: how many wells will be drilled, how much the average well will produce when it first comes online, and how fast that production will decline. But all of those variables are highly uncertain, particularly early in a field’s productive life. Moreover, errors tend to amplify one another: If wells perform worse than expected, they’ll be less profitable and companies won’t drill as many of them.

Whether North Dakota’s oil production meets expectations has major implications for both the state and the country as a whole. For North Dakota, the boom has been nothing short of an economic miracle. The unemployment rate is 2.6 percent, wages and income are rising, and gross domestic product was up nearly 10 percent in 2013. But the state has also become increasingly dependent on the oil industry, which now accounts for more than half of the state’s tax revenue.

The U.S., too, has become increasingly dependent on North Dakota’s oil. The state has accounted for nearly 30 percent of the country’s production growth in the past five years, and the EIA expects it to contribute 45 percent of U.S. growth between 2013 and 2020.

There are signs North Dakota may already be struggling to stay on the drilling treadmill. The number of drilling rigs operating in the state peaked in 2012 and has been trending down. So far, that decline has been offset by two other trends: Drilling is getting faster, meaning each rig can drill more wells, and drilling techniques are improving, meaning the wells themselves are getting better. Taken together, the trends add up to big gains in productivity. In 2007, according to EIA data, a rig working for a month could be expected to add about 116 barrels of oil to the state’s daily production total. In 2013, that number had more than tripled, to 378 barrels a day; over the past three months, per-rig productivity has topped 500 barrels per day.

There’s a practical limit to how long those gains can continue, however. Drilling efficiency — how many wells a rig can drill in a given period — has been essentially flat over the past year. The wells themselves, meanwhile, are getting better at least in part because companies are drilling longer “laterals,” the sections of wells that run horizontally through the shale rock. In 2007, the average well in North Dakota was about 17,000 feet long (including both the vertical and horizontal portions); in 2013, the average well was nearly 20,000 feet long. But that rate of growth, too, is slowing as companies reach the technical and economic limit of how far they can drill.

Eventually, productivity growth won’t just slow but reverse. Companies prioritize drilling in the best parts of an oil field, then gradually shift their drilling to less productive areas. But because the Bakken is so new, no one really knows how those second-tier areas will perform. If they prove successful, Bakken production could enter a long plateau before a gradual decline. If they aren’t, production could decline precipitously. The boom, in other words, is bound to end eventually. Whether it will be followed by a bust remains uncertain.