THIS has been a nerve-racking summer for oil companies. Since June the price of a barrel of Brent crude oil—the global benchmark—has slumped from $115 to $92, a decline of 20% and the lowest for more than two years. That drop is partly thanks to economic weakness. Growth is slowing, particularly in China and the euro zone, reducing oil consumption with it. The International Energy Agency (IEA), US Energy Information Administration and OPEC have all recently lowered their forecasts for global oil demand. But there is also a growing glut of supply. America’s output of shale oil has risen by around 4m barrels a day since 2008, cutting American imports from OPEC almost by half. The club of oil exporters itself is in disarray. On October 1st Saudi Arabia, the cartel’s dominant producer, unilaterally and unexpectedly cut its official prices to shore up its global market share. The kingdom had already trimmed them earlier in the northern summer, as had Kuwait and Iraq. Most Middle Eastern OPEC members are now engaged in a price war in Asia.

All this is dire news for companies in the exploration and production (or “upstream”) part of the industry, many of whose strategies have been built around far higher oil prices. After plunging below $35 during the 2008-09 recession, the price of Brent had recovered to $128 a barrel by spring 2012. The oil firms responded by pouring cash into all sorts of projects, from American shale to deepwater fields in the tropics. Analysts at EY, a consulting firm, estimate that the world’s energy companies are currently bankrolling 163 upstream “megaprojects”—those costing more than $1 billion apiece—worth a combined $1.1 trillion dollars. The majority, EY found, are over budget and behind schedule. Most big projects have been planned around the assumption that oil would stay above $100—a notion that in recent years has become an article of faith in the industry.

Falling prices are not the industry’s only headache. Locked out of many of the lowest-cost fields by “resource nationalism” in the countries that own the reserves, the oil firms have been pushed into more technically difficult prospects. So capital spending has soared—even as production has slowed for many publicly listed oil majors. Douglas-Westwood, another consulting firm, calculates that the productivity of upstream capital spending has fallen by a factor of five since 2000, and that it continues to decline by almost 5% a year.

Demand for oilfield equipment and services has outstripped supply, which has also increased development costs. Even before the latest swoon in oil prices, overall costs had been outstripping revenues by 2-3% a year. The result is that nearly half of the projects the industry has under development will need oil prices greater than $120 a barrel to achieve positive cashflow.

Although the published profits of many of the world’s biggest oil majors have remained relatively buoyant this year, they do not reflect the recent fall in the price of crude. Nor do they reflect the industry’s current panic. Carlyle International Energy Partners, an investment firm, estimates that the biggest oil firms are currently trying to sell $300 billion-worth of assets. Shell and BP between them are divesting $60 billion-worth.

The industry is cutting back on some megaprojects, particularly those in the Arctic region, deepwater prospects and others that present technical challenges. Shell recently said it would again delay its Alaska exploration project, thanks to a combination of regulatory hurdles and technological challenges. The $10 billion Rosebank project in Britain’s North Sea, a joint venture between Chevron of the United States and OMV of Austria, is on hold and set to stay that way unless prices recover. And BP says it is “reviewing” its plans for Mad Dog Phase 2, a deepwater exploration project in the Gulf of Mexico.

Statoil’s vast Johan Castberg project in the Barents Sea is in limbo as the Norwegian firm and its partners try to rein in spiralling costs; Statoil is expected to cut up to 1,500 jobs this year. And then there is Kazakhstan’s giant Kashagan project, which thanks to huge cost overruns, lengthy delays and weak oil prices may not be viable for years (see article).

It is not only the megaprojects that are being hit. Many big oil companies are trimming their spending across the board. Even before the latest fall in oil prices, Shell said its capital spending would be about 20% lower this year than last; Hess will spend about 15% less; and Exxon Mobil and Chevron are making cuts of 5-6%. Since oil started slipping in June, the industry has been hastily reworking its sums—notably BP, which had previously said its spending would remain flat this year and next. It is now widely expected to cut back in 2015.

The oil industry’s herd mentality is well known: several of the companies announcing lower spending have qualified it with the cheery pronouncement that they were doing so “to focus on shale” (gas as well as oil). That may not work. David Vaucher, an analyst at IHS, a research firm, says that to achieve a realistic internal rate of return on investment of 10%, a typical new shale-oil project in America requires an oil price of $57 a barrel. But that is an average: some require $110. If the oil price keeps falling, not even America’s shale miracle will be immune.