South Africa occupied the colony in 1915 after defeating the German force during World War I and administered it from 1919 onward as a League of Nations mandate territory. Although the South African government desired to incorporate 'South-West Africa' into its territory, it never officially did so, although it was administered as the de facto 'fifth province', with the white minority having representation in the whites-only Parliament of South Africa, as well as electing their own local administration the SWA Legislative Assembly. The South African government also appointed the SWA administrator, who had extensive powers. Following the League's replacement by the United Nations in 1946, South Africa refused to surrender its earlier mandate to be replaced by a United Nations Trusteeship agreement, requiring closer international monitoring of the territory's administration (along with a definite independence schedule). The Herero Chief's Council submitted a number of petitions to the UN calling for it to grant Namibia independence during the 1950s. During the 1960s, when European powers granted independence to their colonies and trust territories in Africa, pressure mounted on South Africa to do so in Namibia. In 1966 the International Court of Justice dismissed a complaint brought by Ethiopia and Liberia against South Africa's continued presence in the territory, but the U.N. General Assembly subsequently revoked South Africa's mandate, while in 1971 the International Court of Justice issued an "advisory opinion" declaring South Africa's continued administration to be illegal.

When did South Africa occupy Namibia?