Why Stewards Ruled Gondor Before Lord Of The Rings: The Return Of The King
One of the main storylines of "The Lord of the Rings" is the return of Aragorn as the King of Gondor. But while Aragorn does become the new king by the end of the story, it isn't really clear why there isn't a king before him. Denethor is ruling Gondor, but he's a steward, not a king. Why is that, and why is Aragorn able to waltz in, claim the throne, and rule as a monarch?
The answer comes about a millennium before "The Lord of the Rings" story begins, when the last king of Gondor disappears. To understand that, though, it's important to realize that this is the last of a line of kings and queens who have ruled for thousands of years. They didn't even start in Gondor, but on the island nation of Númenor (as seen in "The Rings of Power"). When that island is destroyed, the survivors set up Gondor and another kingdom called Arnor on the mainland of Middle-earth. (More on Arnor in a minute.)
Gondor is ruled by one branch of the royal family, and power is passed from one family member to the next for centuries. Without getting into too much detail, at one point there is a civil war that kills many of these royals. After that, the kings start to guard the throne from their relatives more aggressively. Many of their family members flee the kingdom or renounce their claims to the throne. Eventually, the thinned-out royal family receives a request for help from Arnor in the north. The Witch-king (yes, the same one Éowyn fights later on) is attacking them, and the prince and heir to the throne of Gondor, a fellow named Eärnur, is sent with an army to help.
What happened to the last king of Gondor?
Prince Eärnur helps stop the Witch-king. But before the villain is defeated, he makes a terrifying charge against Eärnur in battle. The horror of the wraith spooks the brave prince's horse, which bolts, shaming its rider in the heat of battle. (It's a minor detail, but it's important. Bear with us!)
Eventually, Eärnur becomes King of Gondor, and Tolkien explains in "The Return of the King" that, "he was a man of strong body and hot mood; but he would take no wife, for his only pleasure was in fighting, or in the exercise of arms." The guy is unmatched on the battlefield, and as soon as he becomes a childless king (no heir), the Witch-king taunts the proud new monarch for shaming himself when they faced one another in battle. He challenges him to single combat, but Eärnur's advisors convince him not to go — at first. Seven years later, the challenge is repeated, with Tolkien's text adding that the Witch-king taunted that "to the faint heart of his youth he had now added the weakness of age."
Eärnur storms off with a small escort to challenge his foe — only to predictably never be seen again. It's assumed that he dies in torment in the Witch-king's dungeons, but the book critically adds, "since there were no witnesses of his death, Mardil the Good Steward ruled Gondor in his name for many years." Since the family line is so thinned out at this point, no one can be found with a legitimate claim to the throne. With the memory of the Gondorian civil war still fresh, the Stewards decide to continue ruling in Eärnur's stead until someone with a legitimate claim can be found.
Arnor's kings come to the rescue
After Eärnur's death, Gondor can find no certain king. Centuries of rule by the Stewards follow, always with the hope that at some point a member of the royal family will be found who can legitimately claim the throne. That help ends up coming from Arnor, but you wouldn't guess it at first glance.
Earlier in the Third Age of Middle-earth history, Arnor splits into multiple kingdoms, each with its own branch of the royal family. (Some of their royal burial grounds are connected with the Barrow-wights from "The Rings of Power" and, originally, "The Fellowship of the Ring" book.) These kingdoms slowly crumble over time. Once Arnor's divided kingdoms collapse, its ruling kings go into a sort of displaced exile. They become known as the Dúnedain. Their chieftains maintain the line of kingdomless kings, and these are the ancestors that make up Aragorn's family tree.
That's the simplified version of how things shake down in Arnor in the north of Middle-earth. Eventually, a Steward comes to rule Gondor, but the exiled kings of Arnor maintain a low profile for years. Political pressure and the lack of a legitimate kingdom make it hard to find a way to reassert their claim to the Gondorian throne. Nevertheless, they steadily survive, doing what they can to resist Sauron and his servants, even if they operate in small groups and not as a powerful kingdom. This sets the stage for their last chieftain, Aragorn son of Arathorn, to rise and claim the thrones of both Gondor and Arnor during the War of the Ring, finally relieving the Stewards and returning them to their original job as second in command to a legitimate king.