Melisandre thought Stannis Baratheon was The Prince That Was Promised, the hero prophesied to save mankind when the darkness comes. Rhaegar Targaryen thought it was his son with Elia Martell who was destined to be that savior. Maester Aemon believed his niece Daenerys would be the one to rescue the living from the dead.
Like most prophecies on Game of Thrones, that of the Prince That Was Promised is shrouded in mystery, this one spanning thousands of years and the whole world. Here's what you need to know about the many forms of this foretold hero before Game of Thrones' final season.
The Last Hero and the Long Night
Northern legends say that when the first Long Night descended on Westeros, it brought a generation of darkness, and the White Walkers (called the Others in the books) were finally stopped by a figure known as the Last Hero. After the rest of his men died on the journey to find them, the Last Hero asked the Children of the Forest to help him fight. They agreed, and alongside the newly formed Night's Watch they defeated the White Walkers at the Battle for the Dawn (possibly at the spot where Winterfell stands), bringing the light back to the world.
But while the North claims the Last Hero as its own, there are stories from around the world that also speak of a savior who ended a long period of darkness. The World of Ice and Fire compendium says those from the Rhoynar talk of a hero who convinced the Mother Rhoyne's children, lesser gods like the Crab King and the Old Man of the River, to put aside their differences "to sing a secret song that brought back the day." In the far east of Essos in the empire of Yi Ti, they tell of a long ago period when "the sun hid its face from the Earth for a lifetime" out of shame, and "disaster was averted only by the deeds of a woman with a monkey's tail."
Different civilizations throughout Essos speak of a great warrior wielding a sword of fire, who, just like the Last Hero of Westeros, is said to have led the living in a glorious victory over the darkness. He is known by many names: Hyrkoon the Hero, Yin Tar, Neferion, and Eldric Shadowchaser. But in Asshai, the followers of the Lord of Light know him as Azor Ahai, and they say he will return one day to save mankind from the dark again.
Azor Ahai and Lightbringer
The famed sword Azor Ahai used was called Lightbringer, and its creation is an ominous tale. Knowing he needed a great weapon to fight the darkness, Azor Ahai worked for 30 days and 30 nights on a sword, only to see it shatter when he tempered it in water. He then worked for 50 days and nights on an even greater weapon, but it too shattered when he tempered it in the heart of a lion. Finally, Azor Ahai knew what must be done, and for 100 sad days and 100 sad nights he worked on the greatest sword the world had ever known. When he finished, he called for his wife Nissa Nissa and asked her to bare her chest. They say her soul combined with the Red Sword of Heroes when he tempered the blade in her heart. The great sacrifice worked, and Lightbringer, said to be a sword of living fire, helped Azor Ahai win back the day.
Ancient books of Asshai, dating back 5,000 years (when the Long Night might have ended in Westeros), say Azor Ahai will return someday. He'll be sent by R'hllor when the great darkness comes after long summer, like the one Westeros just experienced. "When the stars bleed and the cold breath of darkness falls heavy on the world," this reborn warrior "shall draw from the fire a burning sword." If this warrior fails in the fight against the Great Other, the god of the White Walkers, the world will fall into eternal darkness.
Melisandre thought Stannis was Azor Ahai reborn, but now she thinks it could be Jon Snow. It's possible though she doesn't even have the right gender of mankind's savior; another prophecy about a great savior, The Prince That Was Promised, could actually be about a woman.
The Prince (or Princess) That Was Promised
Melisandre has never actually used the name "Azor Ahai" on the show, but she has spoken of The Prince That Was Promised many times. That title refers to the foretold hero of another prophecy. However, she does use "The Prince That Was Promised" interchangeably with "Azor Ahai" in the books, and that speaks to how similar the two are. They are likely the same prophecy.
It is said The Prince That Was Promised, the hero of mankind who will win the War for the Dawn when the living battle the dead, will be "born amidst salt and smoke, beneath a bleeding star." This hero will also wake dragons from stone. Those parameters could be as specific as they sound (think the red comet that followed the birth of Daenerys' dragons), or metaphorical (the salt of tears shed for a dead Jon Snow), or so vague as to be unknowable until after they happen. No matter what they mean, Melisandre believes those omens also herald Azor Ahai's return because they are one and the same. However, when it comes to The Prince That Was Promised, it is also said "his is the song of ice and fire."
Daenerys heard this mysterious phrase when she visited the House of the Undying in A Clash of Kings. One of the visions she saw there was of her late brother Rhaegar and his first wife Elia holding their newborn son. "He is the prince that was promised," said Rhaegar, "And his is the song of ice and fire." While a phrase like that seems to easily apply to Jon Snow—Rhaegar's secret son with Lyanna, a child of ice (Stark) and fire (Targaryen)—like all prophecies it could mean anything. (And with George R.R. Martin, a healthy dose of skepticism over the most obvious answer being the correct one is more than warranted.)
Rhaegar did have another reason to believe one of his sons might be the promised hero though. His grandfather King Jaeherys II made his son and daughter, Aerys (the Mad King) and Rhaella, marry after a powerful woods witch told him The Prince That Was Promised would be born from their line. Rhaegar was their oldest child, followed by Viserys and Daenerys. Jon Snow (at least on the show) is the only living grandchild of Aerys and Rhaella's line.
At one point in his life, Rhaegar thought he might be the promised savior, before thinking his first son Aegon would be. It's even possible his relationship with Lyanna was at least inspired by the idea their child, who would be the song of ice and fire, was the prophesied hero (or at least the third head of the dragon). But the prophesy itself was misunderstood by Rhaegar and everyone else, because it was never translated correctly.
As Maester Aemon said when he heard about his niece giving birth to dragons—and like Missandei said on Dragonstone—the translation of the prophecy from High Valyrian is incorrect. The word that "prince" derives from has no gender, so it's really The Prince or Princess That Was Promised.
And wouldn't that be a fitting solution to maybe the most important prophecy in the world. For years everyone has been looking for man to save the world, when the hero mankind seeks might be a woman.