According to the narrative, Gondor was founded by brothers Isildur and Anárion, exiles from the downfallen island kingdom of Númenor, and along with Arnor in the north served as a last stronghold of the Men of the West. After an early period of growth, Gondor gradually declined as the Third Age progressed, being continually weakened by the allies of the Dark Lord Sauron, and was only restored in dominance after his final defeat and the crowning of Aragorn.
Based upon long-foreseen conceptions, the history and geography of Gondor were developed in stages, as a part of the major extension of his legendarium that Tolkien undertook during the writing of The Lord of the Rings. The role of the kingdom emerged gradually, from a side "adventure" in the plot becoming the focal figure of later writings. Textual history was traced by Christopher Tolkien in the volumes of The History of Middle-earth, and the overall subject has gained attention among later researchers and fans.