When Arda (the Earth) was created, innumerable stars were already in existence. To provide greater light, the Valar later created the Two Lamps in Middle-earth, and when these were destroyed they created the Two Trees of Valinor. These gave rise to the Ages of the Lamps and the Years of the Trees, however the Ages of the Stars did not conclude until the creation of the Sun.