(known as the "Police Zone" since the German era and which contained the main towns, industries, mines and best arable land), the country was divided into "homelands", the version of South African bantustan applied to Namibia, although only a few were actually established due to non-cooperation by most indigenous Namibians.
After many unsuccessful attempts by the UN to persuade South Africa to agree to the implementation of UN Resolution 435, which had been adopted by the UN Security Council in 1978 as the internationally agreed decolonisation plan for Namibia, transition to independence finally started in 1988 under the tripartite diplomatic agreement between South Africa, Angola and Cuba, with the USSR and the USA as observers, under which South Africa agreed to withdraw and demobilise its forces in Namibia and Cuba agreed to pull back its troops in southern Angola sent to support the MPLA in its war for control of Angola with UNITA. A combined UN civilian and peace-keeping force under Finnish diplomat Martti Ahtisaari supervised the military withdrawals, return of SWAPO exiles and the holding of Namibia's first-ever one-person one-vote election for a constituent assembly in October 1989. This was won by SWAPO although it did not gain the two-thirds majority it had hoped for; the South African-backed Democratic Turnhalle Alliance (DTA) became the official opposition.
Following the adoption of the Namibian Constitution, including entrenched protection for human rights, compensation for state expropriations of private property, an independent judiciary and an executive presidency (the constituent assembly became the national assembly), the country officially became independent on 21 March 1990. Sam Nujoma was sworn in as the first President of Namibia watched by Nelson Mandela (who had been released from prison shortly beforehand) and representatives from 147 countries, including 20 heads of state. Walvis Bay was ceded to Namibia in 1994 upon