Black Flags
The Black Flag Army was a splinter remnant of a bandit and mercenary group recruited largely from soldiers of ethnic Zhuang background, who crossed the border in 1865 from Guangxi, China into northern Vietnam, during the Nguyen dynasty, and were hired and sponsored by Vietnamese authorities to fight against other bandits and rebels. Although brigands, they were known mainly for their fights against the invading French forces, who were then moving into Tonkin (northern Vietnam).
The army was officially disbanded in 1885 as a result of the Treaty of Tientsin between France and China. However, remnants of the army continued to wage a guerilla war against French colonial authorities for years. With the sanction of both Vietnamese and Chinese authorities, the Black Flags joined the Vietnamese irregular forces, stemming French encroachment beyond the Red River Delta.