Then the days of Gondolin were yet full of joy and peace; and none knew that the region wherein the Hidden Kingdom lay had been at last revealed to Morgoth by the cries of Húrin, when standing in the wilderness beyond the Encircling Mountains and finding no entrance he called on Turgon in despair. Thereafter the thought of Morgoth was bent unceasing on the mountainous land between Anach and the upper waters of Sirion, whither his servants had never passed; yet still no spy or creature out of Angband could come there because of the vigilance of the eagles, and Morgoth was thwarted in the fulfilment of his designs. But Idril Celebrindal was wise and far-seeing, and her heart misgave her, and foreboding crept upon her spirit as a cloud. Therefore in that time she let prepare a secret way, that should lead down from the city and passing out beneath the surface of the plain issue far beyond the walls, northward of Amon Gwareth; and she contrived it that the work was known but to few, and no whisper of it came to Maeglin's ears.
Now on a time, when Eärendil was yet young, Maeglin was lost. For he, as has been told, loved mining and quarrying after metals above all other craft; and he was master and leader of the Elves who worked in the mountains distant from the city, seeking after metals for their smithying of things both of peace and war. But often Maeglin went with few of his folk beyond the leaguer of the hills, and the King knew not that his bidding was defied; and thus it came to pass, as fate willed, that Maeglin was taken prisoner by Orcs, and brought to Angband, Maeglin was no weakling or craven, but the torment wherewith he was threatened cowed his spirit, and he purchased his life and freedom by revealing to Morgoth the very place of Gondolin and the ways whereby it might be found and assailed. Great indeed was the Joy of Morgoth, and to Maeglin he promised the lordship of Gondolin as his vassal, and the possession of Idril Celebrindal, when the city should be taken; and indeed desire for Idril and hatred for Tuor led Maeglin the easier to his treachery, most infamous in all the histories of the Elder Days. But Morgoth sent him back to Gondolin, lest any should suspect the betrayal, and so that Maeglin should aid the assault from within, when the hour came; and he abode in the halls of the King with smiling face and evil in his heart, while the darkness gathered ever deeper upon Idril.
At last, in the year when Eärendil was seven years old, Morgoth was ready, and he loosed upon Gondolin his Balrogs, and his Orcs, and his wolves; and with them came dragons of the brood of Glaurung, and they were become now many and terrible. The host of Morgoth came over the northern hills where the height was greatest and the watch least vigilant, and it came at night upon a time of festival, when all the people of Gondolin were upon the walls to await the rising sun, and sing their songs at its uplifting; for the morrow was the great feast that they named the Gates of Summer. But the red light mounted the hills in the north and not in the east; and there was no stay in the advance of the foe until they were beneath the very walls of Gondolin, and the city was beleaguered without hope. Of the deeds of desperate valour there done, by the chieftains of the noble houses and their warriors, and not least by Tuor, much is told in The Fall of Gondolin: of the battle of Ecthelion of the Fountain with Gothmog Lord of Balrogs in the very square of the King, where each slew the other, and of the defence of the tower of Turgon by the people of his household, until the tower was overthrown; and mighty was its fall and the fall of Turgon in its ruin.
Tuor sought to rescue Idril from the sack of the city, but Maeglin had laid hands on her, and on Eärendil; and Tuor fought with Maeglin on the walls, and cast him far out, and his body as it fell smote the rocky slopes of Amon Gwareth thrice ere it pitched into the flames below. Then Tuor and Idril led such remnants of the people of Gondolin as they could gather in the confusion of the burning down the secret way which Idril had prepared; and of that passage the captains of Angband knew nothing, and thought not that any fugitives would take a path towards the north and the highest parts of the mountains and the nighest to Angband. The fume of the burning, and the steam of the fair fountains of Gondolin withering in the flame of the dragons of the north, fell upon the vale of Tumladen in mournful mists; and thus was the escape of Tuor and his company aided, for there was still a long and open road to follow from the tunnel's mouth to the foothills of the mountains. Nonetheless they came thither, and beyond hope they climbed, in woe and misery, for the high places were cold and terrible, and they had among them many that were wounded, and women and children.