Warning: SPOILERS ahead for Game of Thrones season 8

Game of Thrones is ending, and when it does, so will all speculation about how HBO's epic fantasy series finally wraps up. But how will the story end in the A Song of Ice and Fire novels upon which Game of Thrones is based?

Game of Thrones season 8 is not only the last season of the HBO series, but it's also been the most divisive. Perhaps it was inevitable that the culmination of a show as popular as Game of Thrones would never please every viewer, but the backlash to season 8 is hard to ignore. This is partly because the final two seasons are shorter than the previous six. Fewer episodes in a season leads to more accelerated storytelling, and judging by the fan reaction, season 8 didn't always deliver the experience viewers had come to expect from Game of Thrones. Another possible explanation for why some fans have reacted so negatively to season 8 is due to the unusual manner in which Game of Thrones has adapted the A Song of Ice and Fire novels.

Related: Game Of Thrones: Why Cersei’s Death Will Be Better In The Books

The Game of Thrones season 8 finale is the end of the HBO series and there will be no new episodes. However, the same cannot be said of the A Song of Ice and Fire books. By the time Game of Thrones reached season 6, the television series had already overtaken the books. Author George R.R. Martin hasn't finished writing A Song of Ice and Fire, and there are still two more books yet to be released: The Winds of Winter and A Dream of Spring. In order to finish the TV series, showrunners David Benioff and D.B. Weiss worked from details Martin shared with them about how the story will end in the novels. This means that we don't yet know exactly how A Song of Ice and Fire will end.

When HBO first ordered a series based on Martin's A Song of Ice and Fire, the plan was for all seven books to be finished well before the television series ever reached the story material from those as-of-yet unpublished novels. Sadly, things didn't go according to plan. While Game of Thrones season 1 debuted alongside the release of A Dance With Dragons, the fifth book in A Song of Ice and Fire, the television series very quickly caught up to Martin and no new A Song of Ice and Fire books have released since.

Still, this doesn't mean we're completely in the dark about what's to come in A Song of Ice and Fire. The exact ending of the series may not be known, but Martin has previously said that the ending of HBO's Game of Thrones would be similar to that of his novels. There will be some differences, of course, given that certain characters and plots from the novels (Lady Stoneheart, for example) were never included on the TV show, but by and large the endings of both are expected to be roughly the same. A few events from more recent seasons of Game of Thrones have even been confirmed as coming from Martin's still unpublished books - the reveal that Hodor's name comes from "Hold the door" and the burning of Shireen.

Those two events were revealed to Benioff and Weiss during a 2013 meeting with Martin in where the author outlined the remainder of A Song of Ice and Fire's story. "Hold the door" and the burning of Shireen are two of three shocking moments which Benioff and Weiss have said left them stunned. The third moment has yet to be revealed, but since Benioff and Weiss will not say what in season 8 comes from the books and what does not (wanting to preserve some surprise for Martin's readers), we're left guessing. Chances are, though, Daenerys burning King's Landing in season 8, episode 5, "The Bells" is that third moment given how it rocked the Game of Thrones fandom. Just as with the TV show, the books contain plenty of foreshadowing that Daenerys will torch the city, but the manner by which A Song of Ice and Fire reaches that point will likely be quite different.

Presently, there is no release date for The Winds of Winter and it would be foolish to make any predictions. Suffice it to say, even with Game of Thrones now ending, fans are eagerly awaiting the release of a new A Song of Ice and Fire book, wanting to both finally read more of Martin's original story and to compare it with that of the HBO series.

Next: Game of Thrones: The White Walkers' Defeat Can't Be The Same In The Books