Indo China was under French colonial rule since the beginning of 18th century. This French colonial rule continued in unrestricted manner till 1942. The entry of Japan in IInd World War changed the scenario of the war in South East Asia. The Japanese forces succeeded in ousting Britain and French forces from South East Asia and in this way Indo-China came under Japanese control.
The Japanese rule was highly exploitative and this led to the emergence of national movement in Indo-China region. The Vietnamese fought against Japanese domination under the leadership of Ho-Chi-Minh and within the period of Japanese domination, the national movement became very strong.
Japanese forces were withdrawn from Indo-China when Japan started losing in the World War. The surrender of Japan in 1945 led to the end of Japanese rule over Indo-China and it became free. But as the World War ended, France tried to restore its colonial rule over it but the French forces met severe resistance from the nationalists. The fight continued between them and France.
In 1954 French forces were defeated by Vietnamese. By this time, Cold War had emerged in intensified form and the western block pressurized France to grant independence to the Indo China to counter the spread of communism. Thus by the Treaty of Geneva in 1954 Vietnam was declared independent.