“Game of Thrones” showrunners threw in a sex scene in Sunday night’s episode that many fans didn’t see coming.

The night before the epic battle against the White Walkers, several characters spent time coping with what could be their last few hours alive. For 18-year-old Arya Stark, it was losing her virginity to Gendry, a former travel partner who is the bastard son of late King Robert Baratheon. Both of them were in their teens when they last saw each other.

“We’re going to die soon. I’d like to know what it’s like before that happens,” Arya, played by Maisie Williams, 22, told Gendry, played by 31-year-old Joe Dempsie, in reference to having sex.

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

Fans have been rooting for an Arya and Gendry romance since the duo first met in Season 1 and began traveling together in the next season — but the unexpected sex scene still shocked fans and left some cringing.

“Running to google to check Maisie Williams’ age to make sure I didn’t break the law by having my eyes open,” one Twitter user wrote.

'GAME OF THRONES' FINAL SEASON LAS VEGAS ODDS REVEAL BIZARRE THEORIES ABOUT HBO HIT

“Google: Maisie Williams’ age; 22 #GameOfThrones,” another person tweeted.

Another person tweeted, “ARYA SAID I SEE IT, I LIKE IT, I WANT IT, I GOT IT#GameofThrones”

“#GameofThrones Nobody: [no response], Arya: I ain't tryna die a virgin!” a fan wrote.

“Me watching Arya and Gendry about to get it on even though I pretty much watched Arya grow up,” another tweet read.

Williams opened up about her first “GOT” sex scene to Entertainment Weekly, saying co-star Sophie Turner was the first to alert her about it.

“Sophie said, ‘Whatever you do, you have to skip to this episode, this scene first.’ So I just read that and it was practically all I knew about the entire season,” Williams told Entertainment Weekly.

“At first, I thought it was a prank,” Williams added. “I was like, ‘Yo, good one.’ And [the showrunners were] like, ‘No, we haven’t done that this year.’ Oh f—k!”

'GAME OF THRONES' ACTOR RICHARD MADDEN SHOCKS FANS WITH SEASON 1 THROWBACK OF KIT HARINGTON, ALFIE ALLEN

Williams said it sank in she was going to be in a sex scene by the final season table read.

“I got to the read-through and I’m reading the scene and thought, ‘Oh, we’re actually going to do this. When do I shoot this? I need to go to the gym.’ A whole list of things,” she said.

Maisie Williams portraying Arya Stark in "Game of Thrones." (HBO via AP)

Williams said everyone on set was respectful when it came to filming the scene. She added that by the end they were rushing to finish filming the moment.

“David [Benioff] and Dan [Weiss] were like: ‘You can show as much or as little as you want. So I kept myself pretty private. I don’t think it’s important for Arya to flash. This beat isn’t really about that. And everybody else has already done it on the show, so…” Williams said.

CLICK HERE TO GET THE FOX NEWS APP

Dempsie also said the experience was strange for him.

“It’s obviously slightly strange for me because I’ve known Maisie since she was 11, 12 years old,” Dempsie told Entertainment Weekly. “At the same time, I don’t want to be patronizing toward Maisie — she’s a 20-year-old woman. So we just had a lot of fun with it.”