Warning: Major spoilers follow for Game of Thrones.
Just when we thought Game of Thrones couldn't possibly surprise us any more, Arya Stark comes seemingly out of nowhere and kills the Night King. But it wasn't really out of nowhere, because the series has been setting up this big damn hero moment for the youngest Stark sister for at least three seasons according to the most recent official Inside the Episode video from HBO. Jon Snow was never going to be the savior in this episode — he's just too far away from Bran — but his kid sister is there in a pinch. Just in case you were as caught up in that jaw-dropping moment as we were, here's how and why Arya Stark is the one who sticks the Night King with the pointy end.
Early in the battle, Arya stays high above the action to stave off the White Walkers with flaming arrows. Like a true warrior, she knows her strengths. Her training as a water dancer with Syrio Forel in season one teaches her the value of stealth and balance, while her time with the Faceless Men hones her ability to fight in one-on-one combat situations. She's small, stealthy, and easily underestimated, and she uses all of this to her advantage. But without a push from Melisandre, she may not have realized what her true purpose in the Battle of Winterfell was.
Although in true Bran fashion he confirms nothing at all, it's clear he knows his sister will come. He also knows that he needs to be near the weirwood tree because it's a source of power for the Three-Eyed Raven and a place where the Night King is bound during his creation. The show doesn't confirm that the Night King was made in the Stark's particular godswood all those years ago, but the Children of the Forest did choose a spot similar to that one to drive the dragonglass into his heart. Series co-creator David Benioff explains in the Behind the Episode video, "We knew it had to be Valyrian steel put to the exact spot where the Child of the Forest put the dragonglass blade to create the Night King, and he's uncreated by the Valyrian steel."
As far as we know, Arya isn't privy to the Night King's origin story, but she leaves the room in Winterfell knowing two things: she's meant to close those icy blue eyes forever, and today is not the day she dies. Melisandre reminds her that the last time they met she foretold Arya's future as an assassin. And Arya realizes she has closed brown eyes and green eyes, and it's now up to her to end this war by taking out the blue-eyed leader of the undead army. As a kicker, the Red Woman also reminds Arya what we say to the god of death: "Not today."
The show doesn't reveal exactly how Arya makes it from that room in Winterfell to the Godswood, but it's important to remember all of her training. She knows the castle and its ground because she grew up there, and as she demonstrates in the library, she can move quietly enough to avoid the attention of White Walkers, and she can also distract them when need be. Her progress to the godswood and Bran isn't shown, but it doesn't need to be since the past seven seasons have shown us just how stealthy the Stark girl can be.
In fact, she's so good at subterfuge that even the Night King doesn't see her moves coming. In a blink-and-you'll-miss-it moment, Arya allows the Night King to catch her in mid-jump. He believes in that moment that this human girl is nothing to concern himself with, and he lets his guard down as she drops her knife (the same knife Bran gave her in season seven when they reunited). But the trick is, she never lets it hit the ground. Instead, she catches it with her other hand and drives the blade into the Night King's frozen heart, ending him just when he thinks he's won.
It's brilliant, strategic, and perhaps the most triumphant moment in the series to date, because of course it takes Arya freaking Stark's courage and cunning to bring the army of the dead to its knees.