[WARNING: THE FOLLOWING CONTAINS SPOILERS FROM "GAME OF THRONES"]

When “Game of Thrones” star Maisie Williams found out her character, Arya Stark, would be the one to kill the infamous Night King, she thought fans would hate it.

Williams told Entertainment Weekly on Monday that she didn’t find out about the shocking plot twist until the table read for Season 8, Episode 3. Toward the end of the battle of Winterfell, the Night King was about to plunge his sword into Bran Stark in godswood when Arya jumped in with her Valyrian steel dagger. The Night King seemed like he was about to strangle Arya, but she managed to drop the dagger into her other hand and stab him — killing the leaders and his army of White Walkers.

Many fans took to social media to react to the unexpected moment.

“Arya was like....STOP DROP SHUT EM DOWN OPEN UP SHOP #GameOfThrones,” one tweet read.

Another Twitter user wrote, “All hail Arya Stark The Night King Slayer #GameOfThrones.”

“Arya Stark first of her name, Killer of the night king, Slayer of white walkers, Savior of the Seven Kingdoms #AryaStark #NotToday #Arya #GameofThrones,” a user tweeted.

RECAP: ‘GAME OF THRONES’ SEASON 8, EPISODE 3 - THE BATTLE OF WINTERFELL

A video showed fans cheering during the scene at a Sunday night viewing party.

Despite the scene getting a “huge f---ing cheer” from the cast during the table read, Williams said she immediately believed fans would hate it because they expected Jon Snow to be the one to kill the Night King.

“It was so unbelievably exciting, but I immediately thought that everybody would hate it; that Arya doesn’t deserve it,” Williams told the magazine. “The hardest thing is in any series is when you build up a villain that’s so impossible to defeat and then you defeat them.”

'GAME OF THRONES' STAR MAISIE WILLIAMS RESPONDS TO VIEWERS CALLING SEX SCENE 'UNCOMFORTABLE'

Williams said the moment had to be “intelligently done.”

“Otherwise people are like, ‘Well, [the villain] couldn’t have been that bad when some 100-pound girl comes in and stabs him.’ You gotta make it cool. And then I told my boyfriend and he was like, ‘Mmm, should be Jon though really, shouldn’t it?’” she added.

Williams said she eventually got around to the idea that Arya would be the one to kill the Night King after shooting the scene with Melisandre, the Red Priestess played by Carice van Houten.

“When we did the whole bit with Melisandre, I realized the whole scene with [the Red Woman] brings it back to everything I’ve been working for over these past six seasons — four, if you think about it since [Arya] got to the House of Black and White,” Williams said.

“It all comes down to this one very moment. It’s also unexpected and that’s what this show does,” she told Entertainment Weekly. “So then I was like, ‘F—k you Jon, I get it.’”

CLICK HERE TO GET THE FOX NEWS APP

Williams epic moment in Sunday night's episode follows another shocking moment from Episode 2 — when Arya lost her virginity to Gendry.