sent with a small French military force to Hanoi to investigate Vietnamese complaints against the activities of French merchants. In defiance of the instructions of his superiors, he stormed the citadel of Hanoi on 25 April 1882 in a few hours, with the governor Hoàng Diệu committing suicide having sent a note of apology to the emperor. 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 Black Flags had already inflicted one humiliating defeat on a French force commanded by lieutenant de vaisseau Francis Garnier in 1873. Like Rivière in 1882, Garnier had exceeded his instructions and attempted to intervene militarily in northern Vietnam. Liu Yongfu had been called in by the Vietnamese government, and ended a remarkable series of French victories against the Vietnamese by defeating Garnier's small French force beneath the walls of Hanoi. Garnier was killed in this battle, and the French government later disavowed his expedition. The Vietnamese also bid for Chinese support. Vietnam had long been a tributary 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 Lang Son, Bac Ninh, Hung Hoa 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. The Vietnamese were not consulted by either party to these negotiations. 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 Dinh with a