Diamonds are crystals of pure carbon that form under crushing pressures and intense heat. They mostly form in the Earth's mantle, the layer beneath the crust or surface layer, at a depth of about 150km.
Cross-section of a kimberlite pipe (after Harlow (ed), The Nature of Diamonds, 1998) © CUP
Diamonds that were formed deep inside the earth can be mined close to the surface. The earth's geological processes make this possible.
From time to time, gas-rich magmas, or molten rock, force their way upwards from the mantle and erupt explosively at the surface. If they sweep through an area with diamonds in it, they pick them up along with any other minerals that are present.
As it cools, the magma solidifies into carrot-shaped pipes, or sometimes thin dykes, of kimberlite rock. These are named after the place where the first pipe was discovered, in Kimberley, South Africa.
The carrot-shaped pipes normally extend to depths of around 2.5km below the surface. The upper levels erode over hundreds of millions of years and expose any diamonds they are carrying.