Image copyright Reuters Image caption Emilia Clarke plays Daenerys Targaryen in HBO's popular fantasy series

The latest episode of Game of Thrones was uploaded to Amazon early due to an "error", the company has said.

The second instalment of the eighth and final series was not supposed to be broadcast until Sunday evening.

But some Amazon Prime members were able to watch it several hours before that.

"We regret that for a short time Amazon customers in Germany were able to access episode two of season eight of Game of Thrones," an Amazon spokesman said.

"This was an error and has been rectified."

It may have been taken down soon after it was uploaded, but it was long enough for many fans to view the whole episode.

As a result, screengrabs and plot details started appearing online before the official broadcast - which led to fans worrying about accidentally coming across spoilers (which we obviously won't post here).

However, plenty of people had some fun with the leak.

US singer Mariah Carey suggested that she was about to post some "major Game of Thrones spoilers" on Twitter... before going on to upload a picture of herself on the Iron Throne.

This is the second week in a row that Game of Thrones has appeared online early.

Last week's launch episode was made available to DirecTV Now customers four hours early.

A spokesman for AT&T, which owns the service, said: "Apparently our system was as excited as we are for Game of Thrones tonight and gave a few DirecTV Now customers early access to the episode by mistake.

"When we became aware of the error, we immediately fixed it and we look forward to tuning in this evening."

Writing in Forbes, Paul Tassi said: "HBO has to be tearing their hair out that this keeps happening, but this show is so popular and there are so many of these markets to manage, it does almost seem inevitable that something will go wrong.

"At least we're not dealing with people flat-out stealing episodes like we saw in a breach a few years ago, but this is not great either."

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.