History of Arda

In J. R. R. Tolkien's legendarium, the history of Arda, also called the history of Middle-earth, began when the Ainur entered Arda, following the creation events in the Ainulindalë and long ages of labour throughout Eä, the fictional universe. Time from that point was measured using Valian Years, though the subsequent history of Arda was divided into three time periods using different years, known as the Years of the Lamps, the Years of the Trees and the Years of the Sun. A separate, overlapping chronology divides the history into 'Ages of the Children of Ilúvatar'. The first such Age began with the Awakening of the Elves during the Years of the Trees and continued for the first six centuries of the Years of the Sun. All the subsequent Ages took place during the Years of the Sun. Most Middle-earth stories take place in the first three Ages of the Children of Ilúvatar.
Arda is, as critics have noted, "our own green and solid Earth at some quite remote epoch in the past." As such, it has not only an immediate story but a history, and the whole thing is an "imagined prehistory" of the Earth as it is now.
Music of the Ainur.
The supreme deity of Tolkien's universe is Eru Ilúvatar. Ilúvatar created spirits named the Ainur from his thoughts, and some were considered brothers or sisters. Ilúvatar made divine music with them. Melkor, then the most powerful of the Ainur, broke the harmony of the music, until Ilúvatar began first a second theme, and then a third theme, which the Ainur could not comprehend since they were not the source of it. The essence of their song symbolized the history of the whole universe and the Children of Ilúvatar that were to dwell in it—Men and Elves.
Then Ilúvatar created Eä, which means "to be," the universe itself, and formed within it Arda, the Earth, "globed within the void": the world together with the three airs is set apart from "Avakúma", the "void" without. The first 15 of the Ainur that descended to Arda, and the most powerful ones, were called Valar; the lesser Ainur were called Maiar.
Ages of Arda.
Spring of Arda.
When the Valar entered Arda, it was still lifeless and had no distinct geographical features. The initial shape of Arda, chosen by the Valar, was much more symmetrical, including the central continent of Middle-earth. Middle-earth was also originally much larger, and was lit by the misty light that veiled the barren ground. The Valar concentrated this light in two large lamps, called Illuin and Ormal. The Vala Aulë forged two great pillar-like mountains, Helcar in the north and Ringil in the south. Illuin was set upon Helcar and Ormal upon Ringil. In the middle, where the light of the lamps mingled, the Valar dwelt at the island of Almaren upon the Great Lake.
This period, known as the Spring of Arda, was a time when the Valar had ordered the World as they wished and rested upon Almaren, and Melkor lurked beyond the Walls of Night. During this time animals first appeared, and forests started to grow.
The Spring of Arda was interrupted when Melkor returned to Arda, and ended completely when he assaulted and destroyed the Lamps of the Valar. Arda was again darkened, and the fall of the great Lamps spoiled the symmetry of Arda's surface. New continents were created: Aman in the West, Middle-earth proper in the middle, the uninhabited lands (later called the Land of the Sun) in the East. At the site of the northern lamp was later the inland Sea of Helcar, of which Cuiviénen was a bay. At the site of the southern lamp was later the Sea of Ringil. After the destruction of the Two Lamps the Years of the Lamps ended and the Years of the Trees began.
Years of the Trees.
Shortly after the destruction of the Two Lamps and the kingdom of Almaren, the Valar abandoned Middle-earth, moving to the continent of Aman. There they built their Second Kingdom, Valinor. Yavanna made the Two Trees, named "Telperion" (the silver tree) and "Laurelin" (the golden tree) in the land of Valinor. The Trees illuminated Valinor, leaving Middle-earth in darkness lit only by stars. The Years of the Trees were contemporary with Middle-earth's Sleep of Yavanna (recalled by Treebeard as the Great Darkness).
The Years of the Trees were divided into two epochs. The first ten Ages, the Years of Bliss, saw peace and prosperity in Valinor. The Eagles, the Ents and the Dwarves were conceived by Manwë, Yavanna, and Aulë respectively, but placed into slumber until after the awakening of the Elves. The next ten Ages, called the Noontide of the Blessed Realm, saw Varda rekindling the stars above Middle-earth. This was the first time after the Spring of Arda that Middle-earth was illuminated. The first Elves awoke in Cuiviénen in the middle of Middle-earth, marking the start of the First Age of the Children of Ilúvatar, and were soon approached by the Enemy Melkor who hoped to enslave them. Learning of this, the Valar and the Maiar came into Middle-earth and, in the War of the Powers (also called the Battle of the Powers), defeated Melkor and brought him captive to Valinor. This began the period of the Peace of Arda.
After the War of the Powers, Oromë of the Valar summoned the Elves to Aman. Many of the Elves went with Oromë on the Great Journey westwards towards Aman. Along the journey several groups of Elves tarried, notably the Nandor and the Sindar. The three clans that arrived at Aman were the Vanyar, Noldor and the Teleri. They made their home in Eldamar. After Melkor appeared to repent and was released after his servitude of three Ages, he stirred up rivalry between the Noldorin King Finwë's two sons Fëanor and Fingolfin. With the help of Ungoliant, he killed Finwë and stole the Silmarils, three gems crafted by Fëanor that contained light of the Two Trees, from his vault, and destroyed the Trees of the Valar. The world was again dark, save for the faint starlight.
Bitter at the Valar's inactivity, Fëanor and his house left to pursue Melkor, cursing him with the name "Morgoth". While his brother Finarfin chose to stay in Valinor, a larger host led by Fingolfin followed Fëanor. They reached Alqualondë, the port-city of the Teleri, who forbade them from taking their ships for the journey to Middle-earth. The first Kinslaying thus ensued, and a curse was put on the house of the Noldor forever. Fëanor's host sailed on the boats, leaving Fingolfin's host behind—who crossed over to Middle-earth on the Helcaraxë or Grinding Ice in the far north, losing many. The War of the Great Jewels followed, and lasted until the end of the First Age. Meanwhile, the Valar took the last living fruit of "Laurelin" and the last living flower of "Telperion" and used them to create the Moon and Sun, which remained a part of Arda, but were separate from Ambar (the world). The first rising of the sun over Ambar heralded the end of the Years of the Trees, and the start of the Years of the Sun, which last to the present day.
Years of the Sun.
The Years of the Sun were the last of the three great time-periods of Arda. They began with the first sunrise in conjunction with the return of the Noldor to Middle-earth, and last until the present day. The Years of the Sun began towards the end of the First Age of the Children of Ilúvatar and continued through the Second, Third, and part of the Fourth in Tolkien's stories. Tolkien estimated that modern times would correspond to the sixth or seventh age.
Ages of the Children of Ilúvatar.
The First Age of the Children of Ilúvatar, or "Eruhíni", began during the Years of the Trees when the Elves awoke in Cuiviénen in the middle-east of Middle-earth. This marked the start of the years when the Children of Ilúvatar were active in Middle-earth. Later in the First Age the second kindred, humans, also awoke.
In some texts Tolkien referred to the 'First Age of Middle-earth' or the 'First Age of the World' rather than the 'First Age of the Children of Ilúvatar'. These variations had earlier starting points, extending the First Age back to the creation of Arda, but consistently ended with Morgoth's defeat in Beleriand. Each Age ended following a major event in the history of the Children of Ilúvatar.
First Age.
The First Age of the Children of Ilúvatar, also referred to as the Elder Days in "The Lord of the Rings", began during the Years of the Trees when the Elves awoke at Cuiviénen, and hence the events mentioned above under "Years of the Trees" overlap with the beginning of the First Age.
Having crossed into Middle-earth, Fëanor was soon lost in an attack on Morgoth's Balrogs—but his sons survived and founded realms, as did the followers of his half-brother Fingolfin, who reached Beleriand after Fëanor's death. The Noldor for a time maintained the Siege of Angband, Morgoth's stronghold, resulting in the Long Peace. This Peace lasted hundreds of years, during which time Men arrived over the Blue Mountains. Morgoth broke the siege in the "Dagor Bragollach", or the Battle of Sudden Flame. 
The Eldar, Edain and the Dwarves were defeated in the "Nírnaeth Arnoediad" or Battle of Unnumbered Tears, and one by one, the kingdoms fell, even the hidden ones of Doriath and Gondolin. 
At the end of the age, all that remained of free Elves and Men in Beleriand was a settlement at the mouth of the River Sirion and another on the Isle of Balar. Eärendil possessed the Silmaril which his wife Elwing's grandparents, Beren and Lúthien, had taken from Morgoth. But Fëanor's sons still maintained that all the Silmarils belonged to them, and so there were two more Kinslayings. Eärendil and Elwing crossed the Great Sea to beg the Valar for aid against Morgoth. They responded, sending forth a great host. In the War of Wrath, Melkor was utterly defeated. He was expelled into the Void and most of his works were destroyed, bringing the First Age to an end. This came at a terrible cost, however, as most of Beleriand itself was sunk.
Second Age.
The Second Age is characterized by the establishment and flourishing of Númenor, the rise of Sauron in Middle-earth, the creation of the Rings of Power and the Ringwraiths, and the early wars of the Rings between Sauron and the Elves. It ended with Sauron's defeat by the Last Alliance of Elves and Men. 
"The Tale of Years" in Appendix B of "The Lord of the Rings" outlines the major events of the Second Age, especially as they relate to the Rings of Power and the events and characters of "The Lord of the Rings". 
Appendix A contains genealogies of the royal house of Númenor. Appendix D gives details of the Númenórean calendar, including special intercalation in the years 1000, 2000 and 3000, and notes on how this system of intercalation was disrupted by the designation of S.A. 3442 the first year of the Third Age. In addition, several sections of "Unfinished Tales" deal extensively with Númenor and several of its kings. Also, at the end of "The Silmarillion", "Akallabêth" recounts the fall of Númenor and its kings, and also the rise of Gondor and Arnor.
The Men who had remained faithful were given the island of Númenor, in the middle of the Great Sea, and there they established a powerful kingdom. The White Tree of Númenor was planted in the King's city of Armenelos; and it was said that while that tree stood in the King's courtyard, the reign of Númenor would endure. The Elves were granted pardon for the sins of Fëanor, and were allowed to return home to the Undying Lands.
The Númenóreans became great seafarers, and were learned, wise, and had a lifespan beyond other men. At first, they honored the Ban of the Valar, never sailing into the Undying Lands. They went east to Middle-earth and taught the men living there valuable skills. After a time, they became jealous of the Elves for their immortality. Sauron, Morgoth's chief servant, was still active. As Annatar, in disguise he taught the Elves of Eregion the craft of creating Rings of Power. Seven Rings were made for the Dwarves, while Nine were made for Men who later became known as the Ringwraiths. However, he built a stronghold called Barad-dûr and secretly forged the One Ring in the fires of Mount Doom to control the other rings and their bearers. Celebrimbor, a grandson of Fëanor, forged three mighty rings on his own: Vilya, possessed first by the Elven king Gil-galad, then by Elrond; Nenya, wielded by Galadriel; and Narya, given by Celebrimbor to Círdan, who gave it to Gandalf.
As soon as Sauron put on the One Ring, the Elves realized that they had been betrayed and removed the Three. (Sauron eventually obtained the Seven and the Nine. While he was unable to suborn the Dwarf ringbearers, he had more success with the Men who bore the Nine; they became the Nazgûl or Ringwraiths.) Sauron then made war on the elves and nearly destroyed them utterly during the Dark Years, but when it seemed defeat was imminent, the Númenóreans joined the battle and completely crushed the forces of Sauron. Sauron never forgot the ruin brought on his armies by the Númenóreans, and made it his goal to destroy them.
Towards the end of the age, the Númenóreans became increasingly haughty. Now they sought to dominate other men and to establish kingdoms. Centuries after Tar-Minastir's engagement, when Sauron had largely recovered, Ar-Pharazôn, the last and most powerful of the Kings of Númenor, humbled Sauron – his armies deserting in the face of Númenor's might – and brought him to Númenor as a hostage, although this was Sauron's goal. At this time still beautiful in appearance, Sauron gained Ar-Pharazôn's trust and became high priest in the cult of Melkor. At this time, the Faithful (who still worshipped the one god, Eru Ilúvatar), were persecuted openly by those called the King's Men, and were sacrificed in the name of Melkor. Eventually, Sauron convinced Ar-Pharazôn to invade Aman, promising him that he would thus obtain immortality.
Amandil, chief of the Faithful, sailed westward to warn the Valar. His son Elendil and grandsons Isildur and Anárion prepared to flee eastwards, taking with them a seedling of the White Tree of Númenor before Sauron destroyed it, and the "palantíri", gifts of the elves. When the King's forces set foot on Aman, the Valar laid down their guardianship of the world and called on Ilúvatar to intervene.
The world was changed into a sphere and the continent of Aman was removed, although a sailing route from Middle-earth to Aman, accessible to the Elves but not to mortals, persisted. Númenor was utterly destroyed, as was the fair body of Sauron; however, his spirit returned to Mordor, where he again took up the One Ring, and gathered his strength once more. Elendil, his sons and the remainder of the Faithful sailed to Middle-earth, where they founded the realms in exile of Gondor and Arnor.
Sauron arose again and challenged them. The Elves allied with Men to form the Last Alliance of Elves and Men. For seven years, the Alliance laid siege to Barad-dûr, until at last Sauron himself entered the field. He slew Elendil, High King of Gondor and Arnor, and Gil-galad, the last High King of the Noldor in Middle-earth. However, Isildur took up the hilt of Narsil, his father's shattered sword, and cut the One Ring from Sauron's hand. Sauron was defeated, but not utterly destroyed. Afterward, Isildur ignored the counsel of Elrond, and rather than destroy the One Ring in the fires of Mount Doom, he kept it as weregild for his dead father. But the Ring betrayed him and slipped from his finger as he was escaping from an Orc ambush at the Gladden Fields. Isildur was killed by an orc arrow, and the Ring was lost in the Anduin River.
Third Age.
The Third Age lasted for 3021 years, beginning with the first downfall of Sauron, when he was defeated by the Last Alliance of Elves and Men following the downfall of Númenor and ending with the War of the Ring and final defeat of Sauron, the events narrated in "The Lord of the Rings". Virtually the entire history of the Third Age takes place in Middle-earth.
The Third Age saw the rise in power of the realms of Arnor and Gondor, and their fall. Arnor was divided into three petty Kingdoms, which fell one by one in the wars with Sauron's vassal kingdom of Angmar, whilst Gondor fell victim to Kin-strife, plague, Wainriders, and Corsairs. In this time, the line of the Kings of Gondor ends, with the House of the Stewards ruling in their stead. Meanwhile, the heirs of Isildur from the fallen kingdom of Arnor wander Middle-earth, aided only by Elrond in Rivendell; but the line of rightful heirs remains unbroken throughout the age.
This age was characterized by the waning of the Elves. In the beginning of the Third Age, many Elves left for Valinor because they were disturbed by the recent war. However, Elven kingdoms still survived in Lindon, Lothlórien, and Mirkwood. Rivendell also became a prominent haven for the Elves and other races. Throughout the Age, they chose not to mingle much in the matters of other lands, and only came to the aid of other races in time of war. The Elves devoted themselves to artistic pleasures, and tended to the lands which they occupied. The gradual decline of Elven populations occurred throughout the Age as the rise of Sauron came to dominate Middle-earth. By the end of the Third Age, only fragments of the once-grand Elven civilization survived in Middle-earth.
The Wizards arrive around a thousand years after the start of this period to aid the Free Peoples, most importantly Gandalf and Saruman. The One Ring was found by Sméagol but, under the power of the Ring and ignorant of its true nature, he retreated with the Ring to a secret life under the Misty Mountains.
Middle-earth's devastating Great Plague originated in its vast eastern region, Rhûn, where it caused considerable suffering. By the winter of late the Plague spread from Rhûn into Wilderland, on the east of Middle-earth's western lands; in Wilderland it killed more than half the population. In the following year the Great Plague spread into Gondor and then Eriador. In Gondor the Plague caused many deaths, including king Telemnar, his children, and the White Tree; the population of the capital city Osgiliath was decimated, and government of the kingdom was transferred to Minas Tirith. In Eriador, the nascent Hobbit-realm of the Shire suffered "great loss" in what they called the Dark Plague.
The so-called Watchful Peace began in , when Gandalf went to Dol Guldur and the evil dwelling there (later known to be Sauron) fled to the far east. It lasted until 2460 T.A., when Sauron returned with new strength. During this period Gondor strengthened its borders, keeping a watchful eye on the east, as Minas Morgul was still a threat on their flank and Mordor was still occupied with Orcs. There were minor skirmishes with Umbar. In the north, Arnor was long gone, but the Hobbits of the Shire prospered, getting their first Took Thain, and colonizing Buckland. The Dwarves of Durin's folk under Thorin I abandoned Erebor, and left for the Grey Mountains, where most of their kin now gathered. Meanwhile, Sauron created a strong alliance between the tribes of Easterlings, so that when he returned he had many Men in his service.
The main events of "The Hobbit" occur in T.A. 2941.
By the time of "The Lord of the Rings", Sauron had recovered, and was seeking the One Ring. 
The events of the ensuing War of the Ring leading to the end of the Third Age is the subject of "The Lord of the Rings", and summarized in "Of the Rings of Power and the Third Age".
After the defeat of Sauron, Aragorn takes his place as King of the Reunited Kingdom of Arnor and Gondor, restoring the line of Kings from the Stewards of Gondor. Aragorn marries the daughter of Elrond, Arwen, thus for the last time adding Elvish blood to the royal line. As the age ends, Gandalf, Frodo Baggins and many of the remaining Elves of Middle-earth sail from the Grey Havens to Aman.
Fourth Age.
With the end of the Third Age began the Dominion of Men. Elves were no longer involved in Human affairs, and most Elves leave for Valinor; those that remain behind "fade" and diminish. A similar fate meets the Dwarves: although Erebor becomes an ally of the Reunited Kingdom and there are indications Khazad-dûm is refounded, and a colony is established by Gimli in the White Mountains, they disappear from human history. Morgoth's creatures never recover.
Eldarion, son of Aragorn II Elessar and Arwen Evenstar, became King of the Reunited Kingdom in F.A. 120. His father gave him the tokens of his rule, and then gave up his life willingly, as his ancestors had done thousands of years before. Arwen left him to rule alone, passing away to the now-empty land of Lórien where she died. Upon the death of Aragorn, Legolas departed Middle-earth for Valinor, taking Gimli with him and ending the Fellowship of the Ring in Middle-earth.
Tolkien once considered writing a sequel to "The Lord of the Rings", called "The New Shadow", which would have taken place in Eldarion's reign, and in which Eldarion deals with his people turning to evil practices – in effect, a repetition of the history of Númenor. In a 1972 letter concerning this draft, Tolkien mentioned that Eldarion's reign would have lasted for about 100 years after the death of Aragorn. It's stated that his realm would be "great and long-enduring", but also that the lifespan of the royal house was not restored and continued to wane until it was like that of ordinary Men.
Dagor Dagorath.
In a letter, Tolkien wrote that "This legendarium ["The Silmarillion"] ends with a vision of the end of the world [after all the ages have elapsed], its breaking and remaking, and the recovery of the Silmarilli and the 'light before the Sun' – after a final battle [Dagor Dagorath] which owes, I suppose, more to the Norse vision of Ragnarök than to anything else, though it is not much like it." The concept of Dagor Dagorath appears in Tolkien's manuscripts that were published by his son Christopher in "The Shaping of Middle-earth" but not in the published "Silmarillion", where the eventual fate of Arda Marred is left open-ended in the closing lines of the "Quenta Silmarillion".
"Imagined prehistory".
 
Arda is summed up by the Tolkien scholar Paul H. Kocher as "our own green and solid Earth at some quite remote epoch in the past."
In a letter written in 1958, Tolkien places the beginning of the Fourth Age some 6,000 years in the past:
The Tolkien scholar John D. Rateliff writes that one of the "very final passages" of the internal chronology of "Lord of the Rings", "The Tale of Aragorn and Arwen", ends not just with Arwen's death, but the statement that her grave will remain on the hill of Cerin Amroth in what was Lothlorien "until the world is changed, and all the days of her life are utterly forgotten by men that come after ... and with the passing of [Arwen] Evenstar no more is said in this book of the days of old." Rateliff observes that this points up a "highly unusual" aspect of Tolkien's legendarium among modern fantasy: it is set "in the real world but in an imagined prehistory." As a result, Rateliff explains, Tolkien can build what he likes in that distant past, elves and wizards and hobbits and all the rest, provided that he tears it all down again, so that the modern world can emerge from the wreckage, with nothing but "a word or two, a few vague legends and confused traditions..." to show for it. 
Rateliff praises and quotes the scholar of English literature Paul H. Kocher on Tolkien's imagined prehistory and the implied process of fading to lead from fantasy to the modern world: 
Stuart D. Lee and Elizabeth Solopova make "an attempt at a summary", which runs as follows. The "Silmarillion" describes events "presented as factual" but taking place before Earth's actual recorded history. What happened is processed through the generations as folk-myths and legends, especially among the (Old) English. Before the Fall of Numenor, the world was flat. In the Fall, it became round; further geological events reshaped the continents into the Earth as it now is. All the same, the old tales survive here and there, resulting in mentions of Dwarves and Elves in real Medieval literature. Thus, Tolkien's imagined mythology "is an attempt to reconstruct our pre-history." Lee and Solopova comment that "Only by understanding this can we fully realize the true scale of his project and comprehend how enormous his achievement was."
The poet W. H. Auden wrote in "The New York Times" that "no previous writer has, to my knowledge, created an imaginary world and a feigned history in such detail. By the time the reader has finished the trilogy, including the appendices to this last volume, he knows as much about Tolkien's Middle Earth, its landscape, its fauna and flora, its peoples, their languages, their history, their cultural habits, as, outside his special field, he knows about the actual world." The scholar Margaret Hiley comments that Auden's "feigned history" echoes Tolkien's own statement in the foreword to the second edition of "Lord of the Rings" that he much preferred history, true or feigned, to allegory; and that Middle-earth's history is told in "The Silmarillion".