The Battle of Gia Cuc (Gia Quất), fought on 27 and 28 March 1883, was a battle in the Tonkin Campaign between the French and Vietnamese, during the period of undeclared hostilities that preceded the Sino-French War (August 1884–April 1885). Background French intervention in northern Vietnam was precipitated by Commandant Henri Rivière, who was sent with a small French military force to Hanoi at the end of 1881 to investigate Vietnamese complaints against the activities of French merchants. In defiance of the instructions of his superiors, Rivière stormed the citadel of Hanoi on 25 April 1882. Although Rivière subsequently returned the citadel to Vietnamese control, his recourse to force was greeted with alarm in both Vietnam and China. The Vietnamese government, unable to confront Rivière with its own ramshackle army, enlisted the help of Liu Yongfu, whose well-trained and seasoned Black Flag soldiers were to 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 and Guangxi Armies 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 1882, he negotiated a deal with the Chinese statesman Li Hongzhang to divide Tonkin into French and Chinese spheres of influence. Both negotiators were criticized for giving too much away, and the deal soon unravelled. It was never ratified in China, and in France Jules Ferry's incoming administration disavowed the agreement in March 1883 and recalled Bourée. Rivière was disgusted at the deal cut by Bourée, and in early 1883 decided 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 flotilla of gunboats and a force of 520 French soldiers under his personal command. The Battle of Gia Cuc was