In the 19th century, natural gas was usually obtained as a byproduct of producing oil, since the small, light gas carbon chains came out of solution as the extracted fluids underwent pressure reduction from the reservoir to the surface, similar to uncapping a bottle of soda pop where the carbon dioxide effervesces. Unwanted natural gas was a disposal problem in the active oil fields. If there was not a market for natural gas near the wellhead it was virtually valueless since it had to be piped to the end user. In the 19th century and early 20th century, such unwanted gas usually was burned off in the oil fields. Today, unwanted gas (or 'stranded' gas without a market) associated with oil extraction often is returned to the reservoir with 'injection' wells while awaiting a possible future market or to repressurize the formation, which can enhance extraction rates from other wells. In regions with a high natural gas demand (such as the United States), pipelines are constructed when economics permit to take the gas from the wellsite to the end consumer.
Another solution is to export the natural gas as a liquid. Gas-to-liquid (GTL) is a developing technology that converts stranded natural gas into synthetic gasoline, diesel or jet fuel through the Fischer-Tropsch process developed in World War II Germany. Such fuel can be transported to users through conventional pipelines and tankers. Proponents claim GTL burns cleaner than comparable petroleum fuels. Most major international oil companies are in an advanced stage of GTL production, with a world-scale ( a day) GTL plant in Qatar scheduled to be in production before 2010.
Fossil natural gas can be "associated" (found in oil fields) or "non-associated" (isolated in natural gas fields), and is also found in coal beds (as coalbed methane). It sometimes contains a significant amount of ethane, propane, butane, and pentane — heavier hydrocarbons removed prior to use as a consumer fuel — as well as carbon dioxide, nitrogen, helium and hydrogen sulfide.
Natural gas is commercially extracted from oil fields and natural gas fields. Gas extracted from oil wells is called casinghead gas or associated gas. The natural gas industry is extracting gas from increasingly more challenging resource types: sour gas, tight gas, shale gas and coalbed methane.
The world's largest proven gas reserves are located in Russia, with 4.757×10 m³ (1.68×10 cubic feet). With the Gazprom company, Russia is frequently the world's largest natural gas extractor. Major proven resources (in billion cubic meters) are world 175,400 (2006), Russia 47,570 (2006), Iran 26,370 (2006), Qatar 25,790 (2007), Saudi Arabia 6,568 (2006) and United Arab Emirates 5,823 (2006). It is estimated that there are also about 900 trillion cubic meters of "unconventional" gas such as shale gas, of which 180 trillion may be recoverable.
The world's largest gas field is Qatar's offshore North Field, estimated to have 25 trillion cubic meters (9.0×10cubic feet) of gas in place—enough to last more than 200 years at optimum extraction levels. The second largest natural gas field is the South Pars Gas Field in Iranian waters in the Persian Gulf. Located next to Qatar's North Field, it has an estimated reserve of 8 to 14 trillion cubic meters (2.8×10 to 5.0×10 cubic feet) of gas.
Because natural gas is not a pure product, as the reservoir pressure drops when non-associated gas is extracted from a field under supercritical (pressure/temperature) conditions, the higher molecular weight components may partially condense upon isothermic depressurizing — an effect called retrograde condensation. The liquid thus formed may get trapped as the pores of the gas reservoir get deposited. One method to deal with this problem is to re-inject dried gas free of condensate to maintain the underground pressure and to allow re-evaporation and extraction of condensates.
Town gas is a synthetically produced mixture of methane and other gases, mainly the highly toxic carbon monoxide, that can be used in a similar way to natural gas and can be produced by treating coal chemically. This is a historic technology, still used as 'best solution' in some local circumstances, although coal gasification is not usually economic at current gas prices. However, depending upon infrastructure considerations, it remains a future possibility.
Most town "gashouses" located in the eastern United States in the late 19th and early 20th centuries were simple by-product coke ovens which heated bituminous coal in air-tight chambers. The gas driven off from the coal was collected and distributed through town-wide networks of pipes to residences and other buildings where it was used for cooking and lighting purposes. (Gas heating did not come into widespread use until the last half of the 20th century.) The coal tar that collected in the bottoms of the gashouse ovens was often used for roofing and other water-proofing purposes, and also, when mixed with sand and gravel, was used for creating bitumen for the surfacing of local streets.