The petroleum industry, also known as the oil industry or the oil patch, includes the global processes of exploration, extraction, refining, transporting (often by oil tankers and pipelines), and marketing of petroleum products. The largest volume products of the industry are fuel oil and gasoline (petrol). Petroleum (oil) is also the raw material for many chemical products, including pharmaceuticals, solvents, fertilizers, pesticides, synthetic fragrances, and plastics. The extreme monetary value of oil and its products has led to it being known as "black gold". The industry is usually divided into three major components: upstream, midstream, and downstream. Upstream deals with Drilling and Production mainly.
Petroleum is vital to many industries, and is necessary for the maintenance of industrial civilization in its current configuration, making it a critical concern for many nations. Oil accounts for a large percentage of the world's energy consumption, ranging from a low of 32% for Europe and Asia, to a high of 53% for the Middle East.
Other geographic regions' consumption patterns are as follows: South and Central America (44%), Africa (41%), and North America (40%). The world consumes 30 billion barrels (4.8 km³) of oil per year, with developed nations being the largest consumers. The United States consumed 25% of the oil produced in 2007. The production, distribution, refining, and retailing of petroleum taken as a whole represents the world's largest industry in terms of dollar value.
Governments such as the United States government provide a heavy public subsidy to petroleum companies, with major tax breaks at virtually every stage of oil exploration and extraction, including the costs of oil field leases and drilling equipment.
In recent years, enhanced oil recovery techniques -- most notably multi-stage drilling and hydraulic fracturing ("fracking") -- have moved to the forefront of the industry as this new technology plays a crucial and controversial role in new methods of oil extraction.
Petroleum is a naturally occurring liquid found in rock formations. It consists of a complex mixture of hydrocarbons of various molecular weights, plus other organic compounds. It is generally accepted that oil is formed mostly from the carbon rich remains of ancient plankton after exposure to heat and pressure in Earth's crust over hundreds of millions of years. Over time, the decayed residue was covered by layers of mud and silt, sinking further down into Earth's crust and preserved there between hot and pressured layers, gradually transforming into oil reservoirs.
Its importance to the world economy however, evolved slowly, with whale oil being used for lighting in the 19th century and wood and coal used for heating and cooking well into the 20th century. Even though the Industrial Revolution generated an increasing need for energy, this was initially met mainly by coal, and from other sources including whale oil. However, when it was discovered that kerosene could be extracted from crude oil and used as a lighting and heating fuel, the demand for petroleum increased greatly, and by the early twentieth century had become the most valuable commodity traded on world markets.
Imperial Russia produced 3,500 tons of oil in 1825 and doubled its output by mid-century. After oil drilling began in what is now Azerbaijan in 1846 in Baku, two large pipelines were built in the Russian Empire: the 833 km long pipeline to transport oil from the Caspian to the Black Sea port of Batum (Baku-Batum pipeline), completed in 1906, and the 162 km long pipeline to carry oil from Chechnya to the Caspian.
At the turn of the 20th century, Imperial Russia's output of oil, almost entirely from the Apsheron Peninsula, accounted for half of the world's production and dominated international markets. Nearly 200 small refineries operated in the suburbs of Baku by 1884. As a side effect of these early developments, the Apsheron Peninsula emerged as the world's "oldest legacy of oil pollution and environmental negligence". In 1846, Baku (Bibi-Heybat settlement) the first ever well drilled with percussion tools to a depth of 21 meters for oil exploration. In 1878, Ludvig Nobel and his Branobel company "revolutionized oil transport" by commissioning the first oil tanker and launching it on the Caspian Sea.
Samuel Kier established America's first oil refinery in Pittsburgh on Seventh avenue near Grant Street, in 1853. One of the first modern oil refineries were built by Ignacy ?ukasiewicz near Jas?o (then in the dependent Kingdom of Galicia and Lodomeria in Central European Galicia), Poland in 1854-56. These were initially small, as demand for refined fuel was limited. The refined products were used in artificial asphalt, machine oil and lubricants, in addition to ?ukasiewicz's kerosene lamp. As kerosene lamps gained popularity, the refining industry grew in the area.
The first commercial oil well in Canada became operational in 1858 at Oil Springs, Ontario (then Canada West). Businessman James Miller Williams dug several wells between 1855 and 1858 before discovering a rich reserve of oil four metres below ground. Williams extracted 1.5 million litres of crude oil by 1860, refining much of it into kerosene lamp oil. Some historians challenge Canada's claim to North America's first oil field, arguing that Pennsylvania's famous Drake Well was the continent's first. But there is evidence to support Williams, not least of which is that the Drake well did not come into production until August 28, 1859. The controversial point might be that Williams found oil above bedrock while Edwin Drake's well located oil within a bedrock reservoir. The discovery at Oil Springs touched off an oil boom which brought hundreds of speculators and workers to the area. Canada's first gusher (flowing well) erupted on January 16, 1862, when local oil man John Shaw struck oil at 158 feet (48 m). For a week the oil gushed unchecked at levels reported as high as 3,000 barrels per day.
The first modern oil drilling in the United States began in West Virginia and Pennsylvania in the 1850s. Edwin Drake's 1859 well near Titusville, Pennsylvania, is typically considered the first true modern oil well, and touched off a major boom. In the first quarter of the 20th century, the United States overtook Russia as the world's largest oil producer. By the 1920s, oil fields had been established in many countries including Canada, Poland, Sweden, Ukraine, the United States, Peru and Venezuela.
The first successful oil tanker, the Zoroaster, was built in 1878 in Sweden, designed by Ludvig Nobel. It operated from Baku to Astrakhan. A number of new tanker designs were developed in the 1880s.
In the early 1930s the Texas Company developed the first mobile steel barges for drilling in the brackish coastal areas of the Gulf of Mexico. In 1937 Pure Oil Company (now part of Chevron Corporation) and its partner Superior Oil Company (now part of ExxonMobil Corporation) used a fixed platform to develop a field in 14 feet (4.3 m) of water, one mile (1.6 km) offshore of Calcasieu Parish, Louisiana. In early 1947 Superior Oil erected a drilling/production oil platform in 20 ft (6.1 m) of water some 18 miles[vague] off Vermilion Parish, Louisiana. It was Kerr-McGee Oil Industries, as operator for partners Phillips Petroleum (ConocoPhillips) and Stanolind Oil & Gas (BP), that completed its historic Ship Shoal Block 32 well in November 1947, months before Superior actually drilled a discovery from their Vermilion platform farther offshore. In any case, that made Kerr-McGee's Gulf of Mexico well, Kermac No. 16, the first oil discovery drilled out of sight of land. Forty-four Gulf of Mexico exploratory wells discovered 11 oil and natural gas fields by the end of 1949.
During World War II (1939-1945) - control of oil supply from Baku and Middle East played a huge role in the events of the war and the ultimate victory of the allies. Cutting off the oil supply considerably weakened Japan in the latter part of the war. After World War II ended, the countries of the Middle East took the lead in oil production from the United States. Important developments since World War II include deep-water drilling, the introduction of the Drillship, and the growth of a global shipping network for petroleum relying upon oil tankers and pipelines. In 1949, first offshore oil drilling at Oil Rocks (Neft Dashlari) in the Caspian Sea off Azerbaijan eventually resulted in a city built on pylons. In the 1960s and 1970s, multi-governmental organizations of oil-producing nations OPEC and OAPEC played a major role in setting petroleum prices and policy. Oil spills and their cleanup have become an issue of increasing political, environmental, and economic importance.
With the advent of hydraulic fracturing and other horizontal drilling techniques, shale play has seen an enormous uptick in production. Areas such as the Permian Basin and Eagle-Ford shales are now huge hotbeds of production for the largest oil corporations in the United States.
Oil companies used to be classified by sales as "supermajors" (BP, Chevron, ExxonMobil, ConocoPhillips, Shell, Eni and Total S.A.), "majors", and "independents" or "jobbers". In recent years however, National Oil Companies (NOC, as opposed to IOC, International Oil Companies) have come to control the rights over the largest oil reserves; by this measure the top ten companies all are NOC. The following table shows the ten largest national oil companies ranked by reserves and by production in 2012.
|Rank||Company (Reserves)||Worldwide Liquids Reserves (109 bbl)||Worldwide Natural Gas Reserves (1012 ft3)||Total Reserves in Oil Equivalent Barrels (109 bbl)||Company (Production)||Output (Millions bbl/day)|
|1||Saudi Aramco||260||254||303||Saudi Aramco||12.5|
|6||ADNOC||92||199||126||Royal Dutch Shell||3.9|
|9||NOC||41||50||50||Kuwait Petroleum Corporation||3.2|
|^1 : Total energy output, including natural gas (converted to bbl of oil) for companies producing both.|
Aside from the NOCs which dominate the Upstream sector, there are many international companies that have a market share. For example:
Midstream operations are sometimes classified within the downstream sector, but these operations compose a separate and discrete sector of the petroleum industry. Midstream operations and processes include the following:
While some upstream companies carry out certain midstream operations, the midstream sector is dominated by a number of companies that specialize in these services. Midstream companies include:
Some petroleum industry operations have been responsible for water pollution through by-products of refining and oil spills. Though hydraulic fracturing has significantly increased natural gas extraction, there is some belief and evidence to support that consumable water has seen increased in methane contamination due to this gas extraction.  Leaks from underground tanks and abandoned refineries may also contaminate groundwater in surrounding areas. Hydrocarbons that comprise refined petroleum are resistant to biodegradation and have been found to remain present in contaminated soils for years.  To hasten this process, bioremediation of petroleum hydrocarbon pollutants is often employed by means of aerobic degradation.  More recently, other bioremediative methods have been explored such as phytoremediation and thermal remediation. 
The industry is the largest industrial source of emissions of volatile organic compounds (VOCs), a group of chemicals that contribute to the formation of ground-level ozone (smog). The combustion of fossil fuels produces greenhouse gases and other air pollutants as by-products. Pollutants include nitrogen oxides, sulphur dioxide, volatile organic compounds and heavy metals.
The greenhouse gases due to fossil fuels drive global warming. Already in 1959, at a symposium organised by the American Petroleum Institute for the centennial of the American oil industry, the physicist Edward Teller warned then of the danger of global climate change. Edward Teller explained that carbon dioxide "in the atmosphere causes a greenhouse effect" and that burning more fossil fuels could "melt the icecap and submerge New York".
The Intergovernmental Panel on Climate Change, founded by the United Nations in 1988, concludes that human-sourced greenhouse gases are responsible for most of the observed temperature increase since the middle of the twentieth century.
As a result of climate change concerns, many alternative energy enthusiasts have begun using other methods of energy such as solar and wind, among others. This recent view has some petroleum enthusiasts skeptic about the true future of the industry. 
As petroleum is a non-renewable natural resource the industry is faced with an inevitable eventual depletion of the world's oil supply. The BP Statistical Review of World Energy 2007 listed the reserve/production ratio for proven resources worldwide. This study indicated a ratio of proven reserves to production in the Middle East at 79.5 years, Latin America at 41.2 years and North America at 12 years. A misguided interpretation of the ratio has led to many false predictions of imminent world oil shortages since the early years of the oil industry in the 1800s. This has been especially true in the United States, where the ratio of proved reserves-to-production has been between 8 years and 17 years since 1920. Many have mistakenly interpreted the result as the number of years before the oil supply is exhausted. Such analyses do not take into account future reserves growth.
The Hubbert peak theory, which introduced the concept of peak oil, questions the sustainability of oil production. It suggests that after a peak in oil production rates, a period of oil depletion will ensue. Since virtually all economic sectors rely heavily on petroleum, peak oil could lead to a partial or complete failure of markets.
According to market research by IBISWorld, biofuels (primarily ethanol, but also biodiesel) will continue to supplement petroleum. However output levels are low, and these fuels will not displace local oil production. More than 90% of the ethanol used in the US is blended with gasoline to produce a 10% ethanol mix, lifting the oxygen content of the fuel.
The North American oil industry began in Oil Springs in 1858 in less spectacular fashion. James Miller Williams, a coachmaker from Hamilton, dug into the tar-like gum beds of Enniskillen Township to find their source. At a depth of fourteen feet, he struck oil. Williams immediately built a small refinery and began to produce illuminating oil for lamps - kerosene. It was Williams who was able to take full advantage of the ancient resource. Not only was he astute enough to look below the surface of the gum beds to find oil and to realize its commercial potential, but the timing of his discovery was perfect.
Our correspondent writes us from the Oil Springs, under date of the 16th inst., [an] interesting account of a flowing Oil well which has just been tapped. He says:-- I have just time to mention that to-day at half past eleven o'clock, a.m., Mr. John Shaw, from Kingston, C. W., tapped a vein of oil in his well, at a depth of one hundred and fifty-eight feet in the rock, which filled the surface well, (forty-five feet to the rock) and the conductors [sic] in the course of fifteen minutes, and immediately commenced flowing. It will hardly be credited, but nevertheless such is the case, that the present enormous flow of oil cannot be estimated at less than two thousand barrels per day, (twenty-four hours), of pure oil, and the quantity increasing every hour. I saw three men in the course of one hour, fill fifty barrels from the flow of oil, which is running away in every direction; the flat presenting the appearance of a sea of oil. The excitement is intense, and hundreds are rushing from every quarter to see this extraordinary well. Experience oil well diggers from the other side, affirm that this week equals their best flowing wells in Pennsylvania, and they pronounced the oil as being of a superior quality. This flowing well is situation on lot No. 10, Range B, Messrs. Sanborn & Co.'s Oil Territory.
|journal=(help)Ranking by oil reserves and production, 2006 values