The Kingdom of Tungning, also known as Tywan, was a dynastic maritime state that ruled part of southwestern Taiwan and the Penghu islands between 1661 and 1683. It is the first predominantly ethnic Han state in Taiwanese history. At its zenith, the kingdom's maritime power dominated varying extents of coastal regions in southeastern China and controlled the major sea lanes across both China Seas, and its vast trade network stretched from Japan to Southeast Asia.
The kingdom was founded by Koxinga (Zheng Chenggong) after seizing control of Taiwan from Dutch rule. Zheng hoped to restore the Ming dynasty in Mainland China, when the Ming remnants' rump state in southern China was progressively conquered by the Manchu-led Qing dynasty. The Zheng dynasty used the island of Taiwan as a military base for their Ming loyalist movement which aimed to reclaim China proper from the Qing dynasty. Under Zheng rule, Taiwan underwent a process of Sinicization in an effort to consolidate the last stronghold of Han Chinese resistance against the invading Manchus. Until its annexation by the Qing dynasty in 1683, the kingdom was ruled by Koxinga's heirs, the House of Koxinga, and the period of rule is sometimes referred to as the Koxinga dynasty or the Zheng dynasty.