April 1883, realising that the Vietnamese lacked the means of resisting the French effectively, the Chinese civil Mandarin Tang Jingsong (唐景崧) persuaded Liu Yongfu to take the field against Rivière with the Black Flag Army. This resulted in a year of Liu Yongfu's forces fighting an unconventional war. On 10 May 1883 Liu Yongfu challenged the French to battle in a taunting message widely placarded on the walls of Hanoi. On 19 May Rivière confronted the Black Flags in the Battle of Paper Bridge, and the French suffered a disastrous defeat. Rivière's small force (around 450 men) attacked a strong Black Flag defensive position near the village of Cầu Giấy, a few miles to the west of Hanoi, known to the French as Paper Bridge (Pont de Papier). After initial successes the French were eventually enveloped on both wings; only with difficulty could they regroup and fall back to Hanoi. Rivière, Berthe de Villers and several other senior officers were killed in this action. French intervention in Tonkin Rivière's death produced an angry reaction in France. Reinforcements were rushed to Tonkin, a threatened attack by the Black Flags on Hanoi was averted, and the military situation was stabilised. Protectorate over Tonkin On 20 August 1883 Admiral Amédée Courbet, who had recently been appointed to the command of the newly formed Tonkin Coasts Naval Division, stormed the forts which guarded the approaches to the Vietnamese capital Huế in the Battle of Thuận An, and forced the Vietnamese government to sign the Treaty of Huế, placing Tonkin under French protection. At the same time the new commander of the Tonkin expeditionary corps, General Bouët, attacked the Black Flag positions on the Day River. Although the French mauled the Black Flag Army in the Battle of Phủ Hoài (15 August) and the Battle of Palan (1 September), they were unable to capture all of Liu Yongfu's positions, and in the eyes of the world the battles were tantamount to French defeats. Bouët was widely held to have failed in his mission, and resigned in September 1883. In the event, severe flooding eventually forced Liu Yongfu to abandon the line of the Day River and fall back to the fortified city of Sơn Tây, several miles to the west. Confrontation between France and China The French prepared for a major offensive at the end of the year to annihilate the Black Flags, and tried