The ending of William Golding's Lord of the Flies is dramatic and emotional. The growing suspense of the chapters leading up to this point lead the reader to wonder if Ralph will survive the primitive rage of the other boys; after all, the deaths of Piggy and Simon at the hands of the youngsters do not bode well for Ralph.
At the end of the novel, the forest is on fire, an apt symbol for the destructiveness of the boys and their inability to hold on to their civilized, rational selves. The fire is intended to smoke Ralph out from his hiding place in the safety of the forest, and thanks to Sam and Eric, Ralph knows that once Jack and his followers find him, he will be killed.
Ralph runs for his life through the forest, armed with the stake that held the pig's head as a weapon, and when he finds himself on the beach, he falls to the ground. Ralph feels death is imminent, but when he looks up, he sees a grown-up. A naval captain, whose ship noticed the smoke from the fire Jack set, is standing on the beach. Ralph weeps, in relief for his safety and in sorrow for the many losses he and the others have sustained.
The ending of the novel is deeply ironic. Ralph's idea to keep a fire going to attract the attention of potential rescuers never works, but Jack's fire, one meant to cause harm, does bring safety. The naval captain, a symbol of the violent war against which the novel takes place, ironically comments on the lack of control he observes in the boys.
Finally, though rescue should be cause for celebration, the boys are too stunned by the presence of an adult, a reminder of their old lives, to feel anything but confusion, signaling that most of them have descended too far into their primitive selves to understand what rescue actually means.