Bryan Cogman tells THR returning to Craster's Keep was a big challenge: "We had to establish very quickly the horrible things that have been going on."

[WARNING: Spoilers ahead for Sunday's episode of Game of Thrones, "Oathkeeper"]

Game of Thrones once again showed us what's North of the Wall, and it wasn't pretty.

The mutineers at Craster's Keep have turned it into a place of unspeakable horrors, tormenting the captured women day and night. Thrones writer Bryan Corgman says this episode was the most difficult he's written and that this scene in particular was incredibly challenging.

"That was very difficult to write. We had to establish very quickly the horrible things that have been going on since the mutiny. It was very unpleasant," he tells The Hollywood Reporter.

PHOTOS: Joffrey's 10 Most Evil Moments

Here, Cogman breaks down the rest of the episode -- including why Lady Olenna plotted Joffrey's death and the big implications Daenerys' crucifixion scene has for the show.

What were some of the big challenges coming into this episode?

I tend to write the episodes in the middle of the season, which can be a challenge because you've got to balance all these threads that have begun -- and also make sure they will make sense with the overall plan going forward. I was fortunate that this episode had plenty of meaty storylines to tackle.

You had that horrible reveal at Caster's Keep. What was writing that like?

That was very difficult to write. We had to establish very quickly the horrible things that have been going on since the mutiny. It was very unpleasant. At first I had a draft that was something straight out of Apocalypse Now, with Karl being like Kurtz. I got notes back from the team and rewrote it, and we decided to make it about class. Karl had always been looked down upon, and now he finally is at the top of the food chain, and this is what he's choosing to do.

But this was definitely a case of a brilliant rewrite from the showrunners, particularly Karl's monologue, which was entirely scripted by David [Benioff] and Dan [Weiss]. Also, it should be said that a big reason that scene works is due to the performances of the wives, many of whom were featured extras. Their "gift for the gods" chant was incredible.

PHOTOS: Daenerys' 10 Fiercest Moments

Because of what's come before, having Bran captured was all the scarier.

Bran's capture was certainly part of our construction of the subplot but not the sole reason for depicting the horrors there.

What can you tell us about the final shot of the episode? What is the significance of the sacrificed babies?

I can't comment on the last scene.

We also learn Lady Olenna conspired to kill Joffrey. What was her motivation?

She realizes that not so long ago, she was Margaery, and that having her granddaughter married to Joffrey would have been an untenable situation. Olenna is teaching Margaery how to play the game, and if they succeed, Margaery will become the next Ollena, and it will be her teaching the next Tyrell woman.

You previously wrote the bathtub scene last year, and now you had this great Jaime/Brienne moment. What was that like?

The bathtub scene was one of my favorites from the book, so it was a real pleasure to get to write it. Penning Jaime and Brienne's goodbye in this episode was a nice bookend to that. It's not lost on Jaime that the sword he gives Brienne was made from Eddard Stark's sword, and that now she will be using it to protect his daughters.

When you write something like Meereen, do you have an eye on the budget the whole time as far as how much you'll be able to put on the screen?

By this point we have a sense. We don't have a Lord of the Rings budget to show everything, but I'm not complaining. Our budget allows us to do bigger things than any other show on TV. In our first season, we would write these huge scenes and then have to cut things as we were shooting because we realized we didn't have enough time. Now we have a good sense ahead of time of what we can do.

PHOTOS: 'Game of Thrones': 20 Best Quotes

There is a great philosophical speech between Dany and Ser Barristan ahead of the crucifixions. Why did he caution her to be merciful?

He has served the Mad King and has witnessed first-hand the consequences of the decisions he made. He knows she will have to decide what type of ruler she is going to become. Will she be merciful or vengeful? Here she chooses the harsher option.

When you're writing things like this, do you sort of judge the morality of what the characters are doing?

I don't think of the characters as being good or bad, because that doesn't help me as a writer.

Stay tuned to THR.com/GOT for full Game of Thrones coverage.

Email: Aaron.Couch@THR.com

Twitter: @AaronCouch