The Kingdom of Tungning or Kingdom of Formosa was a government that ruled part of southwestern Formosa (Taiwan) between 1661 and 1683. It was founded by Koxinga as part of the loyalist movement to restore the Ming government in China after it was overthrown by the Manchu Qing dynasty. Koxinga hoped to recapture the Chinese mainland from the Manchus by using the island as a base of operations to settle and train his troops.