I T IS A blazing morning in the Permian basin, in west Texas, America’s most productive oilfield. On the high plains a rig gnaws at rock more than 3,000 feet (0.9km) underground. When the drill bit reaches about a mile and a half in depth, nearly six times the height of the Empire State Building, it will munch its way sideways for another two miles. Then comes the interesting part. After completing one horizontal well, the towering rig will rise virtually intact, shuffle forward for about an hour, then prepare to drill again.

Such walking rigs are one way that Concho Resources, the company which owns the well, seeks to extract more oil, more efficiently. Concho is not alone. The shale industry has made America the world’s top producer of crude oil. When America’s sanctions on Iranian crude exports take effect on November 4th, shale will help fill the gap. As tensions rise over Saudi Arabia’s suspected role in the murder of Jamal Khashoggi, a dissident journalist (see Schumpeter), advisers to President Donald Trump point to America’s energy dominance to calm nerves over any drop in Saudi exports. Yet there is fierce debate over how far and fast the industry can actually expand. The Permian is at the centre of this.

Firms continue to invest in shale basins around America—in Oklahoma, for instance, and North Dakota. But as the world becomes more dependent on American oil, American oil is becoming more dependent on the Permian Basin, which spans about 75,000 square miles across west Texas and southeastern New Mexico. On the surface, the natural landscape is all but barren. Clouds drift over a plain adorned by tumbleweed. But underground lies layer upon layer of shale rich with oil and gas, a geological millefeuille. The region accounted for 30% of America’s oil production in July, up from 23% two years earlier.

Other big surges in production—in Saudi Arabia in the 1960s, for instance, or Russia in the early 1970s—followed the discovery of giant oilfields, notes Alessandro Blasi of the International Energy Agency. But the Permian and other American shale basins had already been drilled for decades using conventional wells. Then after the financial crisis of 2007-08 low interest rates helped companies deploy new techniques on well after well: they drilled horizontally, then pummelled shale with sand and water, a process known as hydraulic fracturing, or fracking, until the rock relinquished its oil and gas.

Because about 80% of a shale well’s production occurs within two years of fracking, firms kept buying oil rights and drilling. In 2014 the Organisation of Petroleum Exporting Countries ( OPEC ), fed up with giddy American production, declined to curb its own output. Having soared to $115 in June 2014, the price of Brent crude oil plunged to $29 a barrel in January 2016. Since 2015 Texas alone has seen 71 bankruptcies of exploration-and-production firms, says Haynes and Boone, a law firm.

As a result, investors’ appetite for growth for growth’s sake has waned. Shale companies now claim to have changed how they operate. Take Pioneer Natural Resources. In 2015 David Einhorn, a prominent short-seller, unkindly labelled Pioneer a “mother-fracker” for its profligate ways. Today Timothy Dove, the firm’s chief executive, tempers his bullishness about the Permian with more attention to costs. Pioneer is selling assets so it can centre its business entirely in the Permian, where Mr Dove says he can drill most economically. Executives are being paid for returns as well as rising output.

Companies such as Pioneer and Concho are also revising techniques in the field. Fracking recovers only about 8-10% of oil in shale. “If you can actually go from 10% to 12%, that’s a 20% increase in the amount of oil you’re recovering,” says Mr Dove. So firms are drilling several wells on a single site, to reduce drilling time and costs, and then blasting wells with more water and sand, to extract more oil. Concho is continuously testing optimal ways to frack, for instance by targeting one section of a well, then a section of another nearby, then returning to the first well for more fracking.

However, investment discipline remains patchy. According to analysis by Sanford C. Bernstein, a research firm, which examined the most recent quarterly results of American exploration and production companies, nine of the biggest dozen firms, including Concho and Pioneer, had cashflow from operations that exceeded capital spending (and Pioneer, just barely). Among the dozen smallest companies reviewed, only three earned more than they spent.

Even with high oil prices, now at around $80, the industry faces new pressures. Pipelines from the Permian are jammed with crude. New ones will open late next year, yet other problems will persist. Oil-service firms slashed their rates after the most recent crash, but those prices are creeping up. Mr Trump’s tariffs on imported steel will make equipment more expensive. The cost of hiring and housing workers is soaring. The unemployment rate in Midland, the region’s biggest city, is 2.2%; to lure staff Concho’s headquarters boast child care and a gym. Cinder-block hotels, packed with oil workers in jumpsuits, routinely charge $450 a night.

Workers are not the only vital resource under strain; dealing with water is also challenging. To get more oil out of shale, companies are using more than twice as much water and sand as they did in 2014, according to IHS Markit, a research firm and consultancy (see chart). That makes it harder both to obtain water for fracking and to get rid of it afterwards. Pumping too much back into shale, rather than taking it away, can cause earthquakes. The number of small quakes in the region since January has reached 57, nearly twice that of the same period last year. Adding to their troubles, firms’ productivity gains all but stopped in 2017. As firms drill more wells close together, returns on each can fall, because the oil in neighbouring rock is already depleted. Using more water and sand, after a certain point, does not produce enough oil to pay for the extra materials. In the long term, investors fret that wells will produce an unexpectedly high share of gas, which commands a far lower price than oil. When Pioneer encountered high proportions of gas in some wells last year, its share price sank. Some observers are loudly sounding the alarm. In a new book, “Saudi America”, Bethany McLean, a journalist, questions whether the industry can survive, pointing to measly returns and a need for continuous capital spending. Smaller, indebted companies look particularly vulnerable to rising interest rates or a sudden oil-price crash. Yet it is highly unlikely that the shale industry will collapse. Instead it will change in at least two important ways. The first is consolidation. Even as many oil majors have cut total capital spending, they have invested in shale and in the Permian in particular. Shale’s quick production timetables look a lot safer than multi-decade offshore projects. In July BP announced it would spend $10.5bn for the shale holdings of BHP Billiton, an Australian miner. ExxonMobil in March said it would quintuple its daily shale production in the Permian by 2025. These giant firms may snap up more companies. And their expansion will probably spur further mergers as regional firms seek to bulk up.