China, the traditional overlord of Vietnam, kept contesting French influence in the area and was supporting Annam as well as the Black Flags on its territory at the frontier with Tonkin. Although a treaty had been signed between France and China (11 May 1884 the Tientsin Accord) promising Chinese evacuation from Tonkin, military confrontations continued as in the Bắc Lệ ambush (June 1884). These tensions led to the Sino-French War (1884–85), which ultimately forced China to totally disengage from Vietnam and confirmed the French possessions.
