During World War I, South Africa defeated the German colonial forces in South West Africa and established martial law in the colony after making a peace treaty in July 1915. After the war, the League of Nations officially assigned the former German colony to the United Kingdom as a mandate under the administration of South Africa. When the National Party won the 1948 election in South Africa, it passed laws establishing racial segregation known as apartheid. It applied these laws to South West Africa as well, which it governed as the "de facto" fifth province of South Africa. Apartheid created strict racial classifications and reduced the rights of natives, in particular.