During the 19th and early 20th century, the French ruled Vietnam. There were uprisings to achieve independence that were easily crushed in 1930 and 1931. These uprisings were organised by the Vietnam National Party. During this time, the more militant Indochinese party was becoming stronger and by the outbreak of WWII in 1939, it was the dominant nationalist party in Vietnam. When France fell to Germany in 1940, Japanese troops entered Vietnam and effectively ruled it. However, Japan was defeated by the allies and Ho Chi Minh announced himself as the president of Vietnam on 16th August 1945. Following elections in the north in January 1946, Ho became the president of the Democratic Republic of Vietnam(DRVN). By the 6th March French troops had reoccupied the south of Vietnam and Ho signed an agreement with France that recognised the DRVN as a free state. However, France refused to deal with him and set up a government in South Vietnam called the republic of Cochin-China. This led to an outbreak of war between the North and France in December