In the chapters 16–19, the mutineers, lead by Long John Silver, attack Captain Smollett and the rest of his crew that stayed loyal to him. Though the mutineers are heavily armed with guns and gunpowder, and Smollet and his men have "only a musket and cutlass apiece," Smollet refuses Silver's offer of a truce.
The battle starts in chapter 17. As the men sail towards the island and the relative safety of the stockade, Israel Hands fires a cannon at them. They all survive until they get to the island, where Tom Redruth is shot. Once in the stockade, they find themselves under constant attack. However, they work out that the mutineers are attacking the Union Jack flying over the stockade. It is impossible for them to see the house from where they are.
At the end of the chapter 19,
It appears they were at their wits' end what to do, the stores being so low that we must have been starved into surrender long before help came. But our best hope, it was decided, was to kill off the buccaneers until they either hauled down their flag or ran away with the Hispaniola.
In the end, Silver approaches the stockade and says he will offer them a choice if Captain Smollet gives up the treasure charts.
You give us the chart to get the treasure by, and drop shooting poor seaman and stoving of their heads in while asleep. You do that and we'll offer you a choice. Either you come aboard along of us, once the treasure's shipped... Or if that ain't to your fancy... then you can stay here, you can.
Captain Smollett refuses, saying Silver and his men don't have the ability to find the treasure. He tells Silver, "I will put a bullet in your back when I next see you."