[This story contains spoilers for season two, episode eight of HBO's Westworld, "Kiksuya."]

As Westworld rolled its closing credits in this past week's "Kiksuya," the HBO drama took several viewers' hearts with it.

The eighth episode of the season focused almost entirely on Akecheta, played by Fargo and Longmire veteran Zahn McClarnon, as he charted his decades-long journey as "a flower growing in the dark," slowly crusading toward "the Door." It was mythical, heartfelt and entirely unexpected in how it recontextualized both Akecheta as a man and Ghost Nation as a people. Before "Kiksuya," these faces were most readily recognizable as haunting figures in Maeve's (Thandie Newton) nightmares. By the end of the episode, Akecheta and his family stepped out of the dark and into the spotlight as champions of consciousness, firmly positioned against Dolores (Evan Rachel Wood), also known as the Deathbringer.

Based on the outpouring of social media support for "Kiksuya," it's clear the episode was a success among much of the fanbase. Was the success as clear in the process of creating the episode? Carly Wray, who co-wrote "Kiksuya" alongside writer Dan Dietz, tells The Hollywood Reporter that feelings on the Uta Briesewitz-directed set started trending upward as soon as McClarnon and co-star Julia Jones ("Kohana") began bringing the script to life.

"When we were writing the script and as we were prepping to go and shoot in these incredible locations, there were moments when we were hoping it wasn't going to end up being the stupidest idea the writing staff ever had," says Wray, who was on set for the entire "Kiksuya" shoot. "But then you get out to these incredible locations, and Zahn and Julia become these characters, and you watch the work get elevated beyond your wildest dreams. It was in those moments — particularly as they were speaking in Lakota — where I was getting actual chills, and feeling that this had the potential to be something special and different."

Read on for more thoughts from Wray about how the Jonathan Nolan and Lisa Joy drama's most emotional episode yet came to life.

How does an episode like "Kiksuya" come into existence? Did it start with your pitch? Was it a group pitch? If it originally belonged to the group, how did the writing fall to you and Dan?

The actual way that scripts fall to any given writer or set of writers is often just a rotation that gets set up at the beginning of when the room opens. It's often not tied to anything like, "This is a pitch you brought into the room, so you're going to get [to write] it." You're set fairly early on. I could have ended up writing an episode eight that was about a number of different things. That's typically how it works.

With that said, there was a wish in the room that came from Jonah and Lisa early on that we find a way to address and involve and deepen our Ghost Nation characters in season two. When you're doing a show that's Westworld, you're going to get that distilled out to cowboys and Indians. We've done a lot of work on the cowboy tropes. Here, we have these characters who were set up in season one, and never really got to get inside of them beyond understanding their role as an advanced gameplay narrative in the park. That was already a wish on the table, for Jonah and Lisa.

I brought in the pitch that we do an entire episode from the perspective of one of those characters. That was early on. We weren't sure exactly where it would fall in the rotation. It was my personal desire that not only should we feather these characters in, but it would be really exciting to do kind of a bottle episode. I started the pitch to Jonah saying, "This is a full departure. You might shut this down and say, 'No! Next!' But I want to be in this world. It feels like an exciting way to broaden the texture of the show, or at least make the most of the textures available in the parks that we've built." I brought in that seed of an idea, and Jonah and Lisa went for it.

From there, the room worked together to build out what that looks like. Who is that character? What's the use of that episode, so it's not just a bottle episode where you're meeting a new character and you feel like you're pressing pause on the story everyone's been watching? That's the risk, that you've been building this momentum, and now you're asking the audience to hold on while we tell you this unrelated story. The work of the room was, "How do we make this episode inform the narrative that you've been watching all season, and not just stand totally apart from it?"

We collectively landed on this idea that while this is informing the narrative of the season as a whole, we should also be telling a really personal and emotional story. We landed really quickly on it being a love story. Once we hit on that, we were really off and running. It was exciting to build out a love story for this character who we had only really met as a menace up to this point.

It serves to deepen the themes and ideas that are already in play within Westworld, including the exploration of subjugated and marginalized people rising up. There's a great line from Akecheta that highlights those ideas: "In this world, it's easy to misunderstand intentions."

We wanted to be able to give voice to yet another perspective of the hosts on the reality of the situation. We started out, again, coming from Jonah and Lisa, who were excited about having this season represent a multitude of hosts' perspectives on reality. Not a human perspective and a host perspective, even. Dolores has one angle on what they should do. Maeve has a totally different agenda and perspective. Bernard is trying to figure out what his perspective should even be. They're not a monolith. Here was an opportunity to put another lens on the situation and hear another voice talk about what it means to be waking up in this world and what it means to relate to other people in this world. They're trying to use all of their tools, as all of the hosts are, the tools that they were given… and they were designed by an old white man. They need to start breaking free from the roles placed upon them and the baggage placed upon them.

Early on, when Dan and I started writing the script, we were interested in what their interactions in the park have been like, from their perspective. What's their perspective on the Maeve narrative they were forced into? And how did their perspective on that narrative change as they started waking up? What did they want from that relationship with Maeve? How were they failed by the park, essentially, in that they didn't have the tools to express themselves the way they wanted to, to express and connect with her the way they wanted to at first, so it was misread? We really wanted to explore yet another angle on how everyone feels about being trapped in these narratives.

What kinds of conversations did you have with Zahn about the character he was playing, and conversely, how did he help inform your understanding of Akecheta?

Zahn is an incredible performer. That begins with how deeply he considers the material and how fully he wishes to embody the character, and bring his own work to the character from day one. I was hugely reliant [on him]. Me and Uta Briesewitz, who directed the episode, we were very open to and eager to let Zahn really run with the character, particularly plumbing the emotional depths of this character.

He wanted to talk a lot early on about the timelines: "In these different scenes, how awake am I? I feel like something's off, but can I put words to it? At this point, I feel like I remember her, but is it like I remember her from a dream?" I could help with the logistics, and my wish list of how this character is developing towards full consciousness. Beyond my wildest dreams as a writer, he fleshed out the emotional journey of what it would be like to wake up and realize you used to have a family and a life and a personality that were taken from you. He plumbed the tragedy of that in a way I could have never anticipated.

He also brought a cultural knowledge that we, from the very beginning when Dan and I started this process, wanted. We wanted to have as many Native American collaborators on this as humanly possible. Zahn really brought that background and perspective to the storytelling. Very early on, he was talking about these first emotional moments with Kohana, and even being able to tell us about gestures and a sort of physicality that represents a Native mindset that would be different from a Western connection. He really brought everything, from the actual physicality and actions of the role, to the colors of the tragedy that I wouldn't have even known how to put on the page.

How early did your conversations with him begin? You not only co-wrote "Kiksuya," but also "Reunion," which is Zahn's first appearance as Akecheta, albeit under very different circumstances: in business attire, trying to seduce Logan into investing in the park. Were you already discussing "Kiksuya" and Akecheta's arc at that point?

We were writing episode eight ["Kiksuya"] while we were shooting episode two ["Reunion"]. We were in the early days of writing that script. I was already starting to get into conversations with Zahn, and I was already starting to understand just how capable he was as an actor, and how smart he was as an actor. Working with him on episode two allowed us creatively the freedom to go deeper and further with the stuff we wanted to do in eight, because we knew he would be capable of rendering it.

When Zahn was shooting episode two, I don't know if he knew what he was in for and what we were going to put him through in episode eight, but he really showed us just how far he could go as an actor, and just how interested he was in the character. Even in the scenes he had in episode two, he was so interested in the inner life of the character. We really wanted to write something he could just go nuts with.

You mentioned before wanting to work with as many Native American collaborators as possible. Can you speak more to that?

When we first started talking about the episode, it was where we knew we had to begin, before even putting one word on the page. We wanted to talk to members of multiple Native American communities to talk about the idea and ask about pitfalls, pet peeves, wish lists of representation of this community, particularly as two white writers. We're in a diverse writers room, which is helpful, but we don't have any Native American writers. We wanted to make sure those voices were heard and included really early on.

Even before we started writing the outline, Dan and I talked to Delanna Studi, who is the chair of the SAG President's National Task Force for American Indians. We were connected with her through Ed Harris, I believe, who is actually involved in a lot of Native American arts activism and community. We started with her, and had a phone call where we said, "Is this a bad idea? What can you tell us about what you see when you see Native Americans represented on film and TV right now?" And she was amazing. She was the one who said, "Number one: use the language. There are hundreds of active Native American languages, and we never hear any of them." American cinema has a really ugly history of using gibberish and calling it a Native American language. She was the one who encouraged us to not only pick a language, but to examine what's available other than Navajo, which is the most common one you hear in film and television.

We started with her, and she really helped us connect with other people. She connected us to our translator and our cultural consultant who was on set with us every day, a man named Larry Pourier, who is also a friend of Zahn's; they've been friends for 20 years. They were all enthusiastic about the process, and that process bred new collaborators. Here's a translator who actually lives on the Pine Ridge Reservation who can work with us. Here's someone who can weigh in on casting. As we built the cast, which was largely Native American performers, we wanted to make sure everyone had a voice to say, "This isn't right," or a voice to say, "This is an arena you're not exploring, but it's sitting right here and you could try it." We reached out to all of those collaborators and made sure they had voices throughout the process to help us make [the episode] as real and vibrant as possible.

The episode recontextualizes Ghost Nation as major players within the Westworld mythology, Akecheta especially. Where do we go from here?

The promise at the end of episode eight is that Akecheta and Ghost Nation are on a trajectory. They believe they understand where they need to go next. The story Akecheta finishes telling at the end of the episode — that when the Deathbringer returns, it will be time to find the Door — that story will continue. We're going to find out how Akecheta's role in the park is going to intersect with the other stories we've followed this season, in a major way.

What did you think of "Kiksuya," and how the Akecheta origin story came together? Sound off in the comments below and keep checking THR.com/Westworld for more coverage.