Ching Shih was a former prostitute who married the infamous pirate Cheng I. After the death of her husband in 1807, Ching took command of all his operations, becoming the most important and powerful pirate in China.
Ching eventually married her lieutenant, Chang Pao, and turned her piratical enterprises into a ruthlessly effective organization. At the height of her career, Ching personally commanded a fleet of over 300 junks with a force of 20,000 to 40,000 individual pirates called the Red Flag Fleet. Her power even allowed her to establish hegemony in many Chinese cities, imposing levies or taxes against the citizens as the forces of Qing China and Great Britain struggled against her attacks.
Following several unsuccessful attempts by Cantonese officials to end her rule, Ching's fleet finally suffered a series of defeats against the Portuguese Navy. Along with rifts inside the Red Flag Fleet, Ching's utter dominance over piracy in East Asia was at an end. The Chinese government offered amnesty to all pirates who wished to surrender, which she accepted. She retired from her pirate career the same year, 1810, keeping her loot.