In AD 1644, the Chinese were once again conquered by foreigners, as the Manchurians established the Ching Dynasty. It took the Ching emperors a few years to consolidate control over the entire country, as a series of pretenders and rebels continued to fight.
We often refer to these pretenders and rebels as the Ming Rebels and think of them as supporters of the Ming against the Ching. This is generally not the case as the first of them, Li Tzu-Ch'eng, was responsible for the final overthrow of the Ming dynasty. While a few of them were descended from the Ming, it seems to be more a case of individual rebels fighting both the Ming and the Ching in an attempt to start their own dynasties.
Li Tzu-ch'eng was the son of a village leader in Shansi. After a period of famine and high taxation, Li and his followers revolted. The end of the Ming dynasty came in 1644 when Li succeeded in taking Peking. He assumed the reign title Yung-Ch'ang and declared himself emperor, upon which Chuang Lieh, the last Ming emperor, committed suicide.
Wu San-kuei was a commander in the Ming army, but was born a Manchurian. When his father was killed, and favorite concubine taken by Li Tzu-ch'eng, he responded by giving his allegiance to the Ching, and taking Peking for them by defeating Li Tzu-ch'eng.
Wu San-kuei remained an advisor to the nine year old Shun Chih from the time he became Emperor of the Ching dynasty in 1644 until Shun Chih was able to rule for himself in1651. As a reward, he was made the ruler of the semi-autonomous province of Yunnan, where he used the title Li-yung, and his son was allows to marry a sister of Shun Chih.
In AD 1673, Wu San-kuei and four other generals, each holding similar positions in Kwangsi, Kwangtung, Fukien and Szechuan, rebelled against the Ching dynasty. He declared himself emperor in 1674, and continued using the reign title Li-yung until 1678 when he changed it to Chao-wu. The Ching moved against them, but the rebellion was successful until the death of Wu San-kuei in 1678. The rebellion came to an end with the suicide, in 1681, of his grandson (Schjoth says his son), Wu Shih-fan.