The formation of Earth occurred as part of the formation of the Solar System. It started as a large rotating cloud of dust and gas. This cloud, the solar nebula, was composed of hydrogen and helium produced in the Big Bang, as well as heavier elements produced in supernovas. Then, about 4.68 billion years ago, the solar nebula began to contract, rotate and gain angular momentum. This may have been triggered by a star in the region exploding as a supernova, and sending a shock wave through the solar nebula.