At the turn of the 20th century, Azerbaijan accounted for half of the world's oil production. Oil wells have been operating in Baku since the 1840s. As of the early 21st century, almost all production came from offshore in the Caspian Sea. Azerbaijan was one of only four former Soviet republics (along with Russian, Kazakhstan, and Turkmenistan) to be self-sufficient in petroleum. However, production declined following the 1991 breakup of the Soviet Union until foreign investment provided the capital for new development, turning this trend around in 1998. Production rose from 194,000 barrels per day in 1998 to 311,200 in 2001 and remained roughly stable in 2002.
Proven oil reserves at the beginning of 1998 totaled between 3.6 and 12.5 billion barrels. The State Oil Company of Azerbaijan (SOCAR) has planned for joint development of the offshore fields (which are now largely untapped) and has entered into several agreements to build oil pipelines. For instance, a project with the Caspian Pipeline Consortium would carry oil from the Caspian Sea to the Russian Black Sea port of Novorossiysk. Another deal with Turkey involved the construction of a 1,760-km (1,090-mi) pipeline, the symbolic first length of which was installed in September 2002, to carry crude oil from Baku to Ceyhan, Turkey. In 1995 Azerbaijan had 17 offshore oil fields in production. Guneshli, about 60 mi (96 km) off the Azeri coast, currently accounts for more than half the annual production. By the end of 2002, 33 companies in 15 foreign countries had signed agreements to develop 21 major oil fields in Azerbaijan. As of 2003 disputes over offshore oil rights in the Caspian Sea continued to hinder development of those reserves.
Natural gas production has become more important in recent years, especially in Baku, where some of the oil wells have been exhausted. Estimated reserves amount to 440 billion cu m (15.5 trillion cu ft). Production of natural gas in 2000 totaled 5.7 billion cu m (201 billion cu ft). Ukraine and Iran are interested in running a natural gas pipeline through Azerbaijan en route to Eastern Europe.
In 2000, net electricity generation was 17.7 billion kWh, of which 91.4% came from fossil fuels and 8.6% from hydropower. In the same year, consumption of electricity totaled 16.7 million kWh. Total installed capacity at the beginning of 2001 was 5.1 million kW. Eight thermal plants supply more than 80% of capacity, and the rest comes from hydroelectric plants. The main power plants (both thermal) were near Ali-Bayramy (1,100 MW) and Mingechaur (2,100 MW).
Petroleum and natural gas resources are the basis for an extensive system of refineries which produce gasoline, herbicides, fertilizers, kerosene, synthetic rubber, and plastics.