[Warning: The following contains major spoilers from The 100 episode "Thirteen."]

There have been many deaths on The 100 before, but none hurt us as badly as the loss of Lexa (Alycia Debnam-Carey) after Titus (Neil Sandilands) accidentally shot her in Thursday's episode. Of course, we should have seen it coming as soon as Clarke (Eliza Taylor) and the Grounder commander finally consummated their unspoken romance, the ultimate kiss of death on television.

As if Lexa's death wasn't enough, The 100 then sucker-punched us with yet another shocking twist. The second version of the A.I. that A.L.I.E. (Erica Cerra) is searching for - the one that can actually understand human emotions - has become a sacred object within Grounder society and is embedded inside each of their commanders until the time of their death.

The 100 creator defends Bellamy's betrayal

So what does A.L.I.E. want with A.L.I.E. 2.0? What does Lexa's death mean for the impending war? And why, god, why did Lexa have to die in the first place? TVGuide.com went to creator Jason Rothenberg for all the answers.

Had you always planned on killing Lexa?
Jason Rothenberg:
Had I always planned on killing Lexa? No. ...Alycia was only available to us for a short window of time, a certain number of episodes. We had to be done with her by Episode 7. So I knew that and I knew she was a series regular on another show [Fear the Walking Dead] that was definitely going to last. Safe bet that that show's not going away any time soon. So my ability to use that character was going to be extremely limited, if not impossible, after this season. So that definitely was a big part of my decision making.

That said, once I started to break the season and I knew I had these two big stories: one was the continuing Grounder conflict with the 12 Clans, and how the 13th Clan was going to become a problem and really upend everything in that political situation in Polis. And the other thing was this A.I. story. But there was no unifying idea. There was nothing that brought those two stories together. That would have been OK, ultimately, but I loved the idea of trying to come up with the theory of everything. What is the thing that connects those two worlds? And then I hit on this notion that we talked about the Commander being a reincarnated position...

We then struck on this notion of technological reincarnation. What if you could upload your consciousness into the machine? Which is something that theoretical scientists believe is where the future is going to take us. And then it all became clear to me that this was the point to aim at, the midpoint of the season where everything's going to come together. And once you start dealing with a story that involves reincarnation, technological or otherwise, you have to die first. And it became clear to me that that was the best story to tell.

The 100: Eliza Taylor discusses Clarke and Lexa's romance

What can you reveal about the Grounder politics and power struggles we should expect now that their Commander is dead?
Rothenberg:
That's going to take up a lot of the story oxygen going forward. That's what we're going to see play out in the next few episodes, certainly starting in Episode 9. What is the conclave; how that plays out? Who will be the next commander? What happens to Titus, as the person who unintentionally killed the commander, his own beloved commander? All of this is the stuff of the next run of episodes.

Does Lexa's death affect the way Clarke feels about keeping peace between Skaikru and the Grounders?
Rothenberg:
Not really. Lexa's death will haunt Clarke. Clarke was certainly in love with her, if not falling in love with her. Although she's gone from the physical world, it's something Clarke is going to have to figure out how to compartmentalize, the way that all of us have to do in the real world when people are suddenly and tragically taken away from us. That's kind of the point of The 100 in many ways. These horrible things happen and yet we still have to figure out a way to move on and be the heroes of our own stories. Obviously, Clarke as to figure out how to save her people despite suffering yet another heartbreak. And the flame contains the spirits of the commanders. So does that mean that the Flame contains Lexa? Is Lexa's mind in the Flame? And what does it mean to be human? If her mind's still there, then is she still there? Thematically, that is the theme of the season: what does it mean to be human? And Clarke is going to have to figure that out for herself by the end.

We know A.L.I.E. is searching for the second version of her A.I. What are her intentions with A.L.I.E. 2.0?
Rothenberg:
It's interesting because she's been searching for A.L.I.E. 2.0 for 100 years, since Becca essentially locked her up in the house on the island and went to the space station to work on Version 2. There's a curiosity there. I love the idea that A.L.I.E. wants to know why her creator abandoned her. It's not so much a human hurt or anger or resentment. Those are human qualities, human emotions, and A.L.I.E. is not human. But she is curious. I love the notion that that's what she's been doing. And on a technological level, when Apple puts out the next version of its operating system, we all upgrade to the next version. She wants the upgrade to her software. So she's searching for it for that reason as well.

What did you think of The 100's big twists?