Approximately 4.6 billion years ago, the Sun formed through gravitational collapse of a portion of a giant molecular cloud. As the cloud contracted, conservation of angular momentum caused it to rotate faster and flatten into a protoplanetary disk. The dense center became hot enough to initiate nuclear fusion, creating the Sun, while the surrounding disk material eventually formed the planets, moons, asteroids, and other Solar System objects.