returned the citadel to Vietnamese control, his recourse to force provoked alarm both in Vietnam and in China. The Vietnamese government, unable to confront Rivière with its own ramshackle army, once again enlisted the help of Liu Yongfu, whose well-trained and seasoned Black Flag soldiers would prove a thorn in the side of the French. The Vietnamese also bid for Chinese support. Vietnam had long been a tributary state of China, and China agreed to arm and support the Black Flags, and to covertly oppose French operations in Tonkin. The Qing court also sent a strong signal to the French that China would not allow Tonkin to fall under French control. In the summer of 1882, troops of the Chinese Yunnan Army and Guangxi Army crossed the border into Tonkin, occupying Lạng Sơn, Bắc Ninh, Hưng Hóa and other towns. The French minister to China, Frédéric Bourée, was so alarmed by the prospect of war with China that in November and December he negotiated a deal with the Chinese statesman Li Hongzhang to divide Tonkin into French and Chinese spheres of influence. Neither of the parties to these negotiations consulted the Vietnamese. Rivière, disgusted at the deal cut by Bourée, decided early in 1883 to force the issue. He had recently been sent a battalion of marine infantry from France, giving him just enough men to venture beyond Hanoi. On 27 March 1883, to secure his line of communications from Hanoi to the coast, Rivière captured the citadel of Nam Định with a force of 520 French soldiers under his personal command. During his absence at Nam Định, the Black Flags and Vietnamese made an attack on Hanoi, but Chef de Bataillon Berthe de Villers repulsed them in the Battle of Gia Cuc (Gia Quất) on 28 March. Rivière jubilantly reacted: 'This will force them to take forward their Tonkin Question!' Rivière had perfect timing. He had expected to be cashiered for his Capture of Nam Định; instead he found himself the hero of the hour. There had recently been a change of government in France, and the new administration of Jules Ferry strongly favoured colonial expansion. It therefore decided to back Rivière. Ferry and Foreign Minister Paul-Armand Challemel-Lacour denounced Bourée's agreement with Li Hongzhang and recalled the hapless French minister. They also made it clear to the Chinese that they were determined to place Tonkin under French protection. In