King Minh Mang created the province of Hanoi in 1831, which included the ancient citadel Thang Long. Hanoi became a French colonial city in 1888 after the Nguyen Dynasty was defeated. The city remained in French control until 1954 when President Ho Chi Minh and the communist forces defeated the French and established a new government. After the war between north and south ended in 1975, Hanoi officially became the capital of the Socialist Republic of Vietnam, as it remains today.