In 1869, having conciliated the Vietnamese, Liu also won favour with the Chinese authorities by committing the Black Flag Army to a Chinese punitive campaign against the Yellow Flags, which gave him the opportunity to cripple this rival bandit army. The Chinese expedition was commanded by the veteran general Feng Zicai, who would later win fame during the Sino-French War (August 1884–April 1885) by defeating a French column at the Battle of Zhennan Pass (24 March 1885). In one particular military exploit, known as 'the storming of the thirteen passes', Liu's Black Flags fought their way through the mountains and attacked Huang Chongying's headquarters at Hayang, a town on the Clear River near the border with Yunnan, forcing the Yellow Flag leader to take refuge with his montagnard allies. Although the Chinese and Black Flags failed to annihilate the Yellow Flags, they taught them a severe lesson, and Feng rewarded Liu for his help by offering him an honorary commission in the Chinese army.