Lord of the Flies ending, explained: How does it compare to the book?

Everyone knows children are capable of savagery at the best of times, but Jack Thorne's Lord of the Flies — adapted from William Golding's famous 1954 novel — really ups the stakes.
The four-episode BBC miniseries, now streaming on Netflix, follows a group of British schoolchildren stranded on an island after a plane crash. Although they're semi-organised at first, the relationship between elected chief Ralph (Winston Sawyers) and lead hunter Jack (Lox Pratt) eventually breaks down, with things quickly escalating into violence.
But what happens at the end of the miniseries, what does it all mean, and how does it compare to the end of the novel? Let's unpack.
How does the Lord of the Flies show end?
In the final episode of Lord of the Flies, Ralph is outnumbered and in danger. Following the deaths of his allies Simon (Ike Talbut) and Piggy (David McKenna), the former chief spends the last part of episode 4 on the run from Jack and his tribe, who appear determined to hunt him to the death.
When Ralph hides out in the forest, the boys set a fire to try and smoke him out. Just as he's ready to give up, he encounters two actual adults who have landed on the beach in their small boat. They've seen the smoke and come to help.
One of the adults (Tom Goodman-Hill), not realising that Ralph was on the verge of being murdered, chastises him for not knowing how many boys there are on the island.
"I would have thought you could put on a better show than that," he barks, in peak cold British fashion.
"It was like that at first," Ralph responds. "Before things... we were together then."
"Let's get you boys out to the boat," says the man, leading Ralph away. In the background, the other kids put down their spears and slowly follow.
How does William Golding's book end?
The show is fairly faithful to the book. The novel also ends with the boys being rescued as Ralph is hunted, and there's a similar scene in which a naval officer chastises Ralph because he expects more from a group of British boys.
The book, like the TV show, ends with us knowing that the surviving boys are safe. What we don't know is what the consequences of their actions on the island will be, or what will happen to them when they get back home.
What does the ending of Lord of the Flies mean?
The reason we don't see what's next for the boys after they leave the island is, presumably, because it's not the main point of the story. Like the novel, Thorne's miniseries is really about how quickly society can break down when you remove its basic structures.
As Ralph says to the naval office at the end, "It was like that at first." But if Ralph and Piggy are representative of order, Jack's allure of chaos and savagery quickly proves too strong for the others to resist.
The naval office's reference to "British boys" and what he expects of them shows that he thinks Western society, in particular, is in some way too enlightened to devolve into violence. Lord of the Flies is a clear rejection of that idea.
Lord of the Flies is streaming now on Netflix and BBC iPlayer.