Sophie Turner "accidentally" ruined Ed Sheeran's surprise appearance on 'Game of Thrones' by telling her co-star Maisie Williams.

Sophie Turner

Sophie Turner

The 26-year-old 'Castle on the Hill' hitmaker had a cameo in the first episode of season seven of the HBO fantasy drama after he was brought on board to surprise 20-year-old Maisie - who plays Arya Stark - who is a fan of the flame-haired star.

But the element of surprise didn't last for long, as Sophie - who plays Arya's sister Sansa Stark - "told her by accident" when she asked her when he would be appearing on the show.

Speaking about Ed's cameo, Sophie, 21, said: "That was fun because Maisie loves Ed Sheeran and [creators] David [Benioff] and Dan [Weiss] had it as, like, a surprise for her.

"So they just, they didn't tell her. I told her by accident! I was like, 'Oh, when's Ed Sheeran coming on the show?' But yeah, they kind of did it as a surprise. I was kind of mad because I've been talking about [Justin] Bieber coming on the show for a while now. But it's fine, I'm over it."

The 'Shape of You' singer has received criticism over his appearance in the show, but Sophie believes the star did a fantastic job.

Speaking to 'Entertainment Tonight', she said: "I thought he killed it. Ed Sheeran is a hero! No one slay Ed Sheeran! That's rude."

Meanwhile, the episode's director Jeremy Podeswa also praised Ed for his "lovely job" on the show.

He said: "He comes with no entourage. There's nothing connected with him that's in the least bit self-aware or self-conscious ... I think Ed did a lovely job - he's a lovely actor and a lovely person. He was appropriate for the part because he needed to sing. If people didn't know who Ed was, they wouldn't have thought about it twice. The hoo-ha seems to be from things that are outside of the world of the show. In the world of the show he did a lovely job, and he looks like he belongs in that world.

"I think people interrogated it too much, they're bringing so much of his [superstar] presence into the thing which is far beyond what anybody was thinking going into it. He is known to the producers of the show and some of the cast, and he's a gigantic fan of the show. As everybody knows, the show really eschews stunt casting - it's never, ever done that."