SPOILER ALERT: Do not read if you have not yet watched “Death and the Serpent,” the sixth episode of the sixth season of “Vikings.”

When Lagertha (Katheryn Winnick) first appeared on History’s “Vikings” she was a character ahead of her time. She fought for equality, battled alongside the men as a famous shield maiden, and never compromised herself  even when it meant losing Ragnar (Travis Fimmel) to another woman.

That trailblazing portrayal was a coveted role in the pre-#MeToo era, when messy female characters with breadth and ambition were rarer and often shot with the male gaze. In turn, Lagertha helped bring female viewers to History and became so beloved with fans that creator Michael Hirst received death threats telling him not to kill off the character ahead of the show’s sixth and final season.

Lagertha went on to outlive all other original series regulars, but her journey came to an end in the sixth episode of the final season, “The Death and the Serpent.” After successfully defending her settlement against White Hair (Kieran O’Reilly) in an epic one-on-one battle that left her critically injured, she travelled to Kattegat to update Ubbe (Jordan Patrick Smith) and Torvi (Georgia Hirst) on the settlement’s recent tragedies.

There, she ran into a delirious Hvitserk (Marco Ilso), who believed Lagertha to be his brother Ivar (Alex Hogh Andersen) in serpent form. By plunging his blade into the creature/Lagertha he fulfilled The Seer’s (John Kavanagh) old prophecy that Lagertha would be killed by one of Ragnar’s sons, a fate that Lagertha seemed to accept as she took her final breaths.

Here, Hirst and Winnick discuss Lagertha’s impact, scripting and acting out those final scenes, and the live performance that helped give the cast and crew closure on the beloved character’s death.

How did writing and filming Lagertha’s death stack up against all of the other character deaths you’ve had on the show?

Hirst: Well, obviously the death of Ragnar was a big one for me, but on a personal level, I think Lagertha’s death had a deeper impact and was more emotional. One of the ways I dealt with it was that I wanted it to be significantly different in some way. One of the ways we did that was the song. It’s music that is meant to elicit and provoke deep emotions because you don’t understand the lyrics — they’re in ancient Scottish Gaelic. We hired these people and I didn’t tell anyone what was happening. They knew this was going to be music to accompany the death, but I didn’t tell them any more. Then I invited the crew and whoever was around on the day — the cast — to come in and listen to this singer. It was a live performance, which made it even more special. And by the time she’d finished singing, everybody in the studio was in tears. In a way that helped me cope with my own emotional response to Lagertha’s death because it made it collective. Everyone felt a huge sadness that this character was leaving.

Katheryn, what was it like for you to say farewell to the character?

Winnick: I’m still lost for words because I don’t know if I’ve really said goodbye yet. That final battle was extremely hard. It was one of the hardest rehearsals for me, ever. I really wanted to make it great and it was so important to tell a story through the battle and not just make it another fight. It was physically exhausting to be able to not only shoot it, but also to be able to build your stamina going for it in such an intense shoot. It took us weeks to prepare and then we rehearsed it over and over. I’m really proud of it because it was definitely grueling.

Were you on set for the live performance as well?

Winnick: That song was beautiful. I actually came on site but it was too hard for me, I just couldn’t [stay]. But I did hear the song before I shot the final scenes with Marco.

Michael, fans had sent you death threats over keeping this character alive, how were you able to stay true to her story while still servicing those viewers?

Hirst: What was most important to me was to make sure that Lagertha’s death was as significant and powerful as it could be and was in the right position in the show. It had to be a standalone moment because so often in the show Lagertha has been with the collective: She’s been in the army or she’s fought with her son. She was the queen of Kattegat. I wanted her to have her own story, and that’s why I took her into retirement and out of retirement because it put her in the most dangerous position. She was the most famous shield maiden in the world, she can’t really retire from being that. The idea then was to give a significant part of Season 6 to her story so she would own it. She has a huge fan club and for a lot of women, she is a role model. I was very aware of that. But because I’d helped shape her destiny, I felt that it was appropriate and we could work on these final themes. I wanted it to have as much impact as possible because there are other deaths coming down the line.

Back when The Seer told the prophesy of one of Ragnar’s sons killing Lagertha, is Hvitserk who you had in mind?

Hirst: Back when I had The Seer say that I didn’t know which of the sons would kill her. If I had a strong inclination, it would of course have been Ivar. But the story kept evolving. There was always so much predictability in Ivar’s story and so many moments when it could have gone one way or the other. And it fascinated me that he continued to be a sort of free spirit where, there were occasions when he should have died and he didn’t die. There were occasions when I wasn’t quite sure what he was going to do. But when all the pieces fell in place, it seemed right to me. I was glad that it wasn’t Ivar. That was too predictable. I was glad that she wasn’t killed sort of deliberately. And I was glad that, she felt herself, that it was fate that she’d known all the time, that one of them that would kill her. So to that extent everything fell into place in the end. But for a long time I didn’t know. I was waiting myself to see what would happen.

Katheryn, what was filming that scene like for you?

Winnick: That was actually the last scene I shot. As you know you don’t always shoot things quite logically, but that was actually the final scene. And it was too hard to say goodbye in the moment, only because the conditions we were shooting in. It was zero degrees, freezing cold, and we had this rain machine outside and we were trying not to get hypothermia. It was just a really, really tough scene to shoot and try to act it, and have her last breath in that moment. And then everybody wanted to come up and give me a hug as we said goodbye to Lagertha, but I had to be like, “Okay we’re doing this another time. This weather is too intense!” I think walking into the funeral in the next episode and having that out-of-body experience hit me harder. That’s when I broke down in tears that it was happening.

How are Hvitserk’s actions going to impact him moving forward?

Hirst: There have been times when he wanted to destroy himself. He’s been a conflicted character for a lot of the show. He jumped ship when he left Ubbe and joined Ivar. Nobody really knew why he did that, not even me, but it just felt like at the time that’s what he needed to do. He lacks an identity in a way. He’s lacked a mission. He’s been the son who hasn’t quite found his purpose in life, who’s floated around, who’s made mistakes, and who eventually does a terrible thing. But he will have a redemption and he will give himself a purpose in life.

Lagertha came ahead of a big shift in Hollywood in terms of female characters and what they can be. Have you given that any thought or did you ever feel that weight?

Winnick: I definitely feel that Lagertha was ahead of her time. But the reason I feel that women around the world are drawn to her is because she is such a role model. She sticks up for what she believes in. She is that poster child for the times, that movement, she won’t put up with less. She speaks her mind and will defend herself and her loved ones, and fights for equality. And she has a definition of feminism, which is equality. We were shooting that before the Time’s Up movement. As you know I come from a martial arts background: I grew up fighting and I knew I was the minority of being a girl and I had to go to compete nationally and fight in these competitions. I would have to sometimes face boys because there weren’t very many women fighters. So it’s great now that a lot of women are fighting back and getting the strength that they need. But I do believe Lagertha has paved the way for more strong women characters on television. I just hope it continues that way.

“Vikings” airs Wednesdays at 10 p.m. on History.