On 7 May 1954, the French garrison at Dien Bien Phu surrendered. The defeat marked the end of French military involvement in Indochina. At the Geneva Conference, the French negotiated a ceasefire agreement with the Viet Minh, and independence was granted to Cambodia, Laos, and Vietnam.
By the afternoon of 20 July, the remaining outstanding issues were resolved as the parties agreed that the partition line should be at the 17th parallel and the elections for a reunified government should be held in July 1956, two years after the ceasefire.
At the International Geneva Conference on July 21, 1954, the new socialist French government and the Việt Minh made an agreement which effectively gave the Việt Minh control of North Vietnam above the 17th parallel. The south continued under Bảo Đại. The agreement was denounced by the State of Vietnam and by the United States. A year later, Bảo Đại would be deposed by his prime minister, Ngô Đình Diệm, creating the Republic of Vietnam.