Tonkin (chữ Hán: 東京), or Bắc Kỳ (北圻), was a French protectorate encompassing modern Northern Vietnam from 1883 to 1949. Like the French protectorate of Annam, Tonkin was still nominally ruled by the Vietnamese Nguyễn dynasty. In 1886, the French separated Tonkin from the Nguyễn imperial court in Huế by establishing the office of "Viceroy" (經略衙, Kinh lược nha). However, on 26 July 1897, the position of Viceroy was abolished, officially making the French resident-superior of Tonkin both the representative of the French colonial administration and the Nguyễn dynasty court in Huế, giving him the power to appoint local mandarins. In 1887, Tonkin became a part of the Union of Indochina.
In 1945, the emperor Bảo Đại rescinded the Patenôtre Treaty, ending the French protectorates over Annam and Tonkin, creating the Empire of Vietnam, a Japanese puppet state. Following the surrender of Japan, ending World War II, the Việt Minh launched the August Revolution which led to the abolition of the Nguyễn dynasty and the Proclamation of Independence of the Democratic Republic of Vietnam.
Tonkin was briefly occupied by the Chinese National Army before being returned to France. After eliminating virtually all nationalist oppositions, the communist-led Việt Minh clashed with the French over control of the territory. On 27 May 1948, Tonkin and Annam were partly merged under the Provisional Central Government of Vietnam. The French legally maintained the protectorate until they formally signed over sovereignty to the Bảo Đại and the State of Vietnam in 1950 after signing the Élysée Accords in 1949.
https://ja.wikipedia.org/wiki/トンキン保護国