Ching Shih was a Cantonese prostitute who was captured by pirates and in 1801 married Zheng Yi who was one of the most powerful pirate leaders. She became immersed in the pirate life and learned the military tactics and techniques that Zheng Li used. Zheng Li died in November 1807 and Ching Shih took over the leadership position. At her peak she commanded over 300 ships and as many as 40,000 pirates that controlled the coast of South China as the Red Flag Fleet. She decided to retire from piracy in 1810 when the Chinese government offered her amnesty.