Piracy on the coast of China in the nineteenth century inflicted chaos and serious economic damage, with large mobs of bandits attacking coastal villages as well as wreaking havoc at sea. Yung-lun Yüan's account of this period, published in Chinese in 1830 and in English in 1831, is a colourful depiction of the pirate scourge. Interwoven with the narratives of the pirates themselves as well as those of the courageous civilians who resisted them, the text describes the organisation and rules of the pirates as well as the authorities' attempts to broker peace. Also included is Sir John Dalrymple Hay's account of battling pirates in the 1840s, first published in 1849. Hay (1821–1912) describes his tenure as a British naval commander struggling to suppress piracy. As well as providing a naval perspective on the pirate problem, Hay recounts numerous anecdotes of daring and heroism on the seas.