WARNING: The following article contains spoilers for Game of Thrones Season 8 episode "The Bells."

Part of the appeal of Game of Thrones is its ability to explore moral gray areas with its characters. Not every knight is a hero, and not every lord or lady who performs a bad act is evil. Some people can descend into villainy, some can find redemption, and others still don't bother with either, choosing instead to focus on what's best for realm, no matter the personal cost. Varys, the manipulative Master of Whisperers for multiple rulers, is the best example of the latter.

RELATED: Game of Thrones Star Opens Up About His Totally Unexpected Death

"When you look at me, do you see a hero?" the Spider once asked Ned Stark. When surrounded by characters who charged into battle to rescue loved ones or sacrificed themselves for honor, Varys didn't appear to possess any of the qualities we would expect from a champion of righteousness, but as the series unfolded, and the superficially heroic ones fell, it became clear the Spider was the true hero of the people of Westeros.

Varys in Game of Thrones: The Bells

Unfortunately, as with almost every other half-decent character on Game of Thrones, Varys was killed off. His end came in this week's episode, at the hands of Daenerys Targaryen, who grew wary of his actions. She was absolutely right.

"The Bells" began with Varys writing a letter about Jon Snow's true heritage. He was then interrupted by one of his Little Birds, who reported that the queen was refusing to eat, to which Varys vaguely replied they'd "try again at supper." That prompted the Little Bird to admit she felt as if she was being watched by the guards. "The greater the risk, the greater the reward," Varys told her. It's easy to miss, but all evidence suggests we were witnessing a scheme being executed.

RELATED: Arya's "Green Eyes" Prophecy Could Still Come True On Game of Thrones

Varys' treachery wasn't limited simply to his attempt to turn Jon against Dany; he had been trying to poison her. Unlike other murder plots, this one wasn't motivated by greed or a desire for vengeance. Instead, Varys aimed to remove Daenerys for the same reason he did anything else: for the good of the realm.

Growing doubt among Dany's coterie saw bitter vindication in "The Bells" with the massacre at King's Landing. Varys could see the Mother of Dragons' slow descent into madness and, when words failed, he acted to prevent tragedy when the opportunity presented itself.

Daenerys-Varys-Game-of-Thrones

He kept fighting for that better world until the very end. Even when he knew he was in danger, he didn't attempt to flee. When Grey Worm and his Unsullied arrived, Varys was still writing messages, presumably to the remaining great houses of Westeros, to rally support for Jon Snow (or, rather, Aegon Targaryen) as the rightful heir to the Iron Throne.

That treacherous act is far from surprising. Varys had long manipulated those in power, and played the Game of Thrones just like everybody else,  just not for the same reasons as the other participants. If we look back, he's arguably one of the most admirable people in the Seven Kingdoms.

RELATED: Everyone Who Dies in Game of Thrones' Battle of King's Landing

Let's not forget that Varys wasn't always a noble. As he revealed to Tyrion in "And Now His Watch is Ended," he was once a poor boy from Lys who traveled across Essos with an acting troupe before a sorcerer arrived one day and took him away. That sorcerer castrated young Varys and used those parts in a sordid magic ritual, discarding the boy and leaving him to die on the streets.

Varys did everything he could to survive and claw his way up to power, until he had accumulated enough to take his vengeance on the sorcerer. In that way, he shares a lot in common with Littlefinger: They're both singularly intelligent people who came from nothing yet amassed great power, although they worked toward very different goals. Littlefinger coveted the throne for himself ,while Varys sought to ensure a just ruler wore the crown. To that end, he had to allow Ned Stark to die when the latter proved unable to play the game. However, he later saved Tyrion because he knew he would help to contribute to the stability of the realm.

Varys-Tyrion-Game-of-Thrones

Stability is no doubt what Varys had hoped Dany would bring. Tyrion once said he suspected it was Varys who saved Dany and her brother from slaughter as infants. The Spider is manipulative, and he isn't above threatening others -- as he did with Tyrion in the early days -- but it was all for a greater purpose, and never out of hatred or greed. The same cannot be said for many other surviving characters who appear heroic on the surface.

Season 8 has arguably failed many of its characters, at least in the eyes of dedicated fans. However, whether you believe Varys lost many of his defining qualities by the time his part came to a fiery end, fans must be able to appreciate that Game of Thrones presented him with final moments that remained true to his essence. From the shadows, he kept fighting until the very end.

Concluding Sundays at 9 p.m. ET on HBO, Game of Thrones stars Peter Dinklage as Tyrion Lannister, Nikolaj Coster-Waldau as Jaime Lannister, Lena Headey as Cersei Lannister, Emilia Clarke as Daenerys Targaryen, Sophie Turner as Sansa Stark, Maisie Williams as Arya Stark and Kit Harington as Jon Snow.