Game of Thrones’ battle for King’s Landing turned out to be not a battle but a slaughter perpetrated by the once-heroic Daenerys Targaryen — and “The Bells” has been an intensely controversial episode as a result.

But as a statement about what the series has been about all along, “The Bells” was a stunning success.

Essentially, Game of Thrones devoted its climax to portraying the horrors of war, and to a longtime hero becoming a monster. It’s a bold, unforgettable statement — an instantly iconic and shocking late turn to the eight-season saga.

And it’s entirely consistent with the series’ core themes and motifs: the misuse of power, how innocents suffer when the high lords seek power, and the subversion of expectations. That is, it’s classic George R.R. Martin. (Martin, who wrote the Song of Ice and Fire novels on which the TV show is based, revealed his planned ending to showrunners David Benioff and D.B. Weiss years ago, and recently said he doesn’t think their ending will be “that different” from his own.)

If Game of Thrones ended with a triumphant Daenerys Targaryen heroically taking the Iron Throne, it wouldn’t be Game of Thrones. This is the show of Ned Stark’s death. This is the show of the Red Wedding. This is the ending it was headed toward all along.

Dany going dark is a far more interesting ending than the other leading possibilities

The choice to veer in this direction resolves many apparent problems with the structure of Game of Thrones’ final season.

The first potential problem was the White Walkers. Simply put: They’re boring. In a series known for charismatic and interesting antagonists, here was a horde of mute ice zombies who simply wanted to wipe out all life. The White Walkers posed the risk that despite all of Martin’s subversions of tropes in the past, Game of Thrones would simply replicate the classic fantasy ending: a big battle of good versus evil, where good triumphs.

Indeed, the initial, Winterfell-focused episodes this season were mainly about admirable characters getting along and working together for the common good — which is not, to me, what this series is about. So I was pleased to see the White Walkers dispensed with halfway through the season.

The second potential problem was Team Cersei. Once the supernatural threat was eliminated, the Lannister queen and her rather one-note set of cronies in King’s Landing became Game of Thrones’ apparent final set of antagonists. Again, it seemed like a simplistic good-versus-evil face-off. And really, after our heroes triumphed over the embodiment of death, were we supposed to be afraid of these clowns?

In fact, we weren’t. What unfolded in “The Bells” wasn’t really a battle against Cersei’s forces — it was a massacre. There was no drama whatsoever about the outcome, because minutes after Daenerys unleashed her dragonfire, it was clear that her forces would win.

And that’s when Game of Thrones truly showed its hand. All along, it wasn’t headed toward a predictable good-versus-evil climax. The ultimate denouement was always going to be about our heroes being torn apart, as a horrific tragedy unfolds at Dany’s hands. It’s an ending that restores the subversiveness that’s been so sorely lacking from recent seasons.

The execution of the aftermath of Dany’s choice was excellent

Since it’s obviously not true that this turn for Daenerys came out of nowhere — it’s been repeatedly foreshadowed in the show and likely planned by Martin since the 1990s — the most common criticism I’ve seen of “The Bells” is that the execution of that turn was lacking. (See, for instance, my colleague Zack Beauchamp’s article here.)

Some of these criticisms are fair enough. It would have been nice if Daenerys’s devolution was a bit more gradual and could have unfolded over a few more episodes. The writers piling tragedy upon tragedy on her in a heavy-handed effort to get her to a place where she’d snap was a bit much. And did it really make sense that she’d progress so quickly to a deliberate massacre of thousands of civilians?

But as soon as Dany made that crucial decision to ignore the episode’s titular bells and unleash hell on King’s Landing, the execution of what happened afterward was utterly harrowing.

Even though I had long expected this dark turn for Daenerys was coming, I was stunned by just how thoroughly Benioff and Weiss committed to it. Indeed, Dany as a person all but vanishes from the episode — for its final half-hour, we only see distant glimpses of her and Drogon. Instead, we get an up-close look at the horrendous deaths of civilian after civilian, from Drogon’s fire and from Dany’s own invading forces (both Unsullied and Northmen).

“In most large stories like this, it seems like there’s a tendency to focus on the heroic figures,” Weiss said in the “Inside the Episode” segment dedicated to “The Bells,” explaining Dany’s absence. “We really wanted to keep our perspective and our sympathies on the ground at this moment, because those are the people who are really paying the price for the decisions that she’s making.”

We see Jon and Tyrion horrified by what’s unfolding, but the true bravura sequences are Arya’s struggle to escape the chaos and her failed attempts to rescue someone, anyone. Even the trained assassin who killed the Night King is lucky to survive the sort of destruction Dany is unleashing.

All of this is consistent with the core themes Martin established for the series long ago. War is hell. Power can turn even a good person into a monster. Your heroes often aren’t as heroic as you might think.

And while I’ve thought Benioff and Weiss have veered too far in the direction of simplistic, crowd-pleasing spectacle in Game of Thrones’ recent seasons, it was unmistakably a bold decision to make the series’ penultimate episode mainly about the horrors of war, even when carried out by the “good” guys. (Fans and viewers are understandably horrified, and that’s the point.)

Maybe Jon Snow will get the throne, but if he does, it will feel awful

I don’t know what will happen in Game of Thrones’ series finale, but my guess is that some combination of Jon, Tyrion, and Arya will move against Dany and kill her, with Jon naturally being the leading contender to end up on the throne instead.

But if this does happen, rather than being a wish-fulfillment ending, it’s going to feel terrible for them — and for viewers.

In their way, both Tyrion and Jon are culpable for what happened in King’s Landing. Jon couldn’t abide by Dany’s wishes to keep his mouth shut about his heritage. Instead, he let out the secret by telling Sansa, who told Tyrion, who told Varys. This fed Dany’s paranoia — and rightfully so, considering how quickly plots were hatched against her once the news began to spread.

Meanwhile, Tyrion first decided to tell Varys Jon’s secret — and then to turn on Varys when he tried to act on that information. In doing so, Tyrion demonstrated loyalty to his queen (though she rightly questioned why he talked to Varys about Jon’s heritage before her). But in retrospect, it’s clear that Varys foresaw exactly what was about to transpire in King’s Landing and was trying to prevent a massacre — and for that, Tyrion sent him to a fiery death. (“I hope I’m wrong,” Varys said. He wasn’t wrong.)

Now Jon will likely feel compelled to turn against the woman he loved, and Tyrion will feel compelled to betray the leader he once had such lofty hopes for. It’s a suitably tragic conclusion to a series that’s long been focused on the dark side of power.