All these roles have a part in setting its price. The result is a peculiar market that says as much about global economics and politics as it does about supply and demand.
After four years when the highest average oil prices in history often seemed to defy economic gravity, petroleum fell in mid-2014.
It had risen to $107.73 a barrel in June, even as Americans and Europeans drove fewer miles in more fuel-efficient cars, curbing consumption of gasoline, the biggest source of oil demand.
Meanwhile, supply expanded as the sustained higher prices made techniques such as deepwater drilling and fracking pay off.
Those fundamentals started to register in the summer, as Chinese imports sagged, Europe teetered on the brink of recession, and the stronger US economy made barrels priced in dollars relatively more expensive.
Instead of stanching the glut by pumping less oil, Middle East exporters engaged in a price war to defend their market share. OPEC decided in late November to keep its oil production unchanged, pushing the price of oil down some more. It reached $60 a barrel in December for the first time since 2009.
New sources of supply such as Canadian oil sands and US shale have loosened the cartel’s grip on the market.
Saudi Arabia stands to gain as lower prices hurt political and economic rivals such as Russia and Iran, already facing strain from sanctions.
Cheap oil also helps Saudi producers compete better against the US, where production costs more. Some US drillers in North Dakota and Texas have made plans to scale back.
Through the mid-20th century, a group of multinational oil giants known as the Seven Sisters (including the companies that became Exxon Mobil, Chevron and BP) dominated the market.
Controlling the barrels from the wellhead to the gasoline tank, they traded mainly with each other on confidential terms; there was no open market. Countries with oil fields wrested more control with the formation in 1960 of the Organisation of Petroleum Exporting Countries. The cartel’s Arab members used their power for political and economic ends, shocking the global economy with embargoes in 1973 and 1979.
In the 1980s, OPEC infighting, the emergence of new suppliers and the development of futures exchanges gave rise to new market-based prices.
Today the international benchmark is Brent crude from the North Sea, which has the advantage of political stability but lately is contending with declining output that makes trading sparse.
The US benchmark, West Texas Intermediate crude, started trading at less than the Brent price in 2010 as supplies of shale oil became plentiful.
In 2013, the European Union raided offices of Shell, BP and others to investigate possible manipulation of reference prices produced by the publisher Platts.
As the world industrialises and consumes more energy, each new barrel of oil costs more than it used to, because the cheapest and easiest oil has already been pumped.
This observation gave rise to a theory called “peak oil,” which holds that world production will eventually max out and decline as oil fields deplete.
Sceptics of this notion point to the technological innovations that let US producers extract oil and gas from previously impermeable shale, unlocking vast new resources, albeit at greater expense; the issue isn’t quantity but cost.
The other variable, of course, is demand, and the stunning weakness this year raises long-term questions about oil’s future as consumers grow more efficient and switch to alternative fuels such as natural gas and renewable power. Oil supplied 31% of the world’s energy in 2012, down from 46% in 1973.
There may come a day when oil gets cheap because it’s unwanted.
That’s the argument often advanced by advocates of divestment. They warn of a financial crisis caused by a bursting “carbon bubble” of inflated energy-company valuations after fossil-fuel prices rise to account for the costs of contributing to global warming.