In August 1718, Bonnet anchored the "Royal James" on an estuary of the Cape Fear River to careen and repair the ship. In late August and September, Colonel William Rhett, with the authorization of South Carolina governor Robert Johnson, led a naval expedition against pirates on the river. Rhett and Bonnet's men engaged in combat for hours, but the outnumbered pirates ultimately surrendered. Rhett arrested the pirates and brought them to Charles Town in early October. Bonnet escaped on 24 October, but was recaptured on Sullivan's Island. On 10 November, Bonnet was brought to trial and charged with two acts of piracy. Judge Nicholas Trott sentenced Bonnet to death. Bonnet wrote to Governor Johnson to ask for clemency, but Johnson endorsed the judge's decision, and Bonnet was hanged in Charles Town on 10 December 1718.