United Nations Commissioner for Namibia

United Nations Commissioner for South West Africa was a post created by the United Nations General Assembly (UNGA) in 1966 to assert the UN's direct responsibility for South West Africa which was then under illegal occupation by apartheid South Africa.
UNGA renamed the post United Nations Commissioner for Namibia in 1968.
Namibia eventually achieved its independence from South Africa on 21 March 1990.
Background.
After World War I, South Africa was given a League of Nations mandate to administer South West Africa. Following World War II and the introduction of apartheid, South Africa's mandate was revoked by UNGA in October 1966. In May 1967, during its fifth session, UNGA established the United Nations Council for South West Africa "to administer South West Africa until independence, with the maximum possible participation of the people of the territory". In 1968, it adopted the name "Namibia" for the territory. The United Nations Security Council endorsed UNGA's actions by adopting resolutions 264 and 269 of 1969.
UNSCR 276 of 1970 confirmed the illegality of South Africa's presence in the territory. The same year, the Security Council decided to request an Advisory Opinion of the International Court of Justice (ICJ) as to the legal consequences for Member States of South Africa's continued presence in Namibia notwithstanding UNSCR 276 of 1970. The following year the ICJ's Advisory Opinion confirmed UNGA's revocation of the mandate and declared that South Africa must withdraw its administration and end its occupation and that Member States were under an obligation to refrain from any support or assistance to South Africa in Namibia.
UN Commissioners.
There were seven occupants of the post of United Nations Commissioner for Namibia (UNCN). South Africa refused to recognize any of the UN Commissioners.
Transition to independence.
Martti Ahtisaari returned to Namibia in April 1989 as the UN's Special Representative to head up the United Nations Transition Assistance Group (UNTAG), which supervised the South African appointed Administrator-General, Louis Pienaar, and to oversee the decolonisation of one of Africa's last colonies.
Setback.
On 1 April 1989 — "D-Day" for the peace plan — UNTAG units had not been fully deployed and those that were (mostly civilians and monitors) lacked equipment for both transportation and communication. Despite this, hopes were high, as an informal ceasefire had held for nearly seven months. However, in the early morning, SADF reported that heavily armed groups of SWAPO militants of the People's Liberation Army of Namibia (PLAN) had begun crossing the border and establishing positions in northern Namibia which, if true, would have been a clear violation of the agreement that they should be confined to their Angolan bases. SWAPO denied that it had violated the terms of the agreement and claimed that its fighters had been going to turn in weapons to UNTAG and had been attacked by the SADF. 
UNTAG's head, Martti Ahtisaari, came under pressure from British prime minister, Margaret Thatcher, who was visiting Southern Africa at the time, and from South African foreign minister, Pik Botha, to allow SADF forces to leave their bases and repel the SWAPO incursions. Ahtisaari quickly decided to allow a limited deployment, and would later describe this decision as his most difficult. He told "The New York Times":
A period of intense fighting followed with the SWAPO forces sustaining over 350 fatalities.
New agreement.
Hurried negotiations took place and a new agreement was reached on 20 April 1989 when SADF forces withdrew to base for 60 hours, allowing SWAPO militants to withdraw peacefully. The SADF were then given two weeks to confirm that SWAPO had indeed left Namibia and also to capture any weapons caches discovered. This agreement was stuck to by both sides, though Ahtisaari and the UN Secretary-General were nervous about the length of time the SADF were out of their bases, and pushed hard to get them back to barracks. Despite these reservations, the withdrawal and verification passed without incident and by the end UNTAG was almost fully deployed, albeit a month behind schedule.
In October 1989, under orders of the UN Security Council, Pretoria was forced to demobilise some 1,600 members of Koevoet (Afrikaans for "crowbar"). The Koevoet issue had been one of the most difficult UNTAG faced. This counter-insurgency unit was formed by South Africa after the adoption of UNSCR 435, and was not, therefore, mentioned in the Settlement Proposal or related documents. The UN regarded Koevoet as a paramilitary unit which ought to be disbanded but the unit continued to deploy in the north in armoured and heavily armed convoys. In June 1989, the Special Representative told the Administrator-General that this behaviour was totally inconsistent with the Settlement Proposal, which required the police to be lightly armed. Moreover, the vast majority of the Koevoet personnel were quite unsuited for continued employment in the South West African Police (SWAPOL). The Security Council, in its resolution 640 (1989) of 29 August, therefore demanded the disbanding of Koevoet and dismantling of its command structures. South African foreign minister, Pik Botha, announced on 28 September 1989 that 1,200 ex-Koevoet members would be demobilised with effect from the following day. A further 400 such personnel were demobilised on October 30. These demobilisations were supervised by UNTAG military monitors. 
Peaceful end.
The 11-month transition period ended relatively smoothly . Political prisoners were granted amnesty, discriminatory legislation was repealed, South Africa withdrew all its forces from Namibia, and some 42,000 refugees returned safely and voluntarily under the auspices of the Office of the UN High Commissioner for Refugees (UNHCR). Almost 98% of registered voters turned out to elect members of the Constituent Assembly. The elections were held in November 1989 and were certified as free and fair by the UN Special Representative, with SWAPO taking 57% of the vote, just short of the two-thirds necessary to have a free hand in revising the framework constitution. The opposition Democratic Turnhalle Alliance received 29% of the vote. The Constituent Assembly held its first meeting on 212 November 1989 and resolved unanimously to use the 1982 Constitutional Principles in Namibia's new constitution.
Independence day.
Independence Day on 21 March 1990 was celebrated in Windhoek's sports stadium which was attended by numerous international representatives, including the main players, the UN Secretary-General Javier Pérez de Cuéllar and President of South Africa F W de Klerk, who jointly conferred formal independence on Namibia. Sam Nujoma was sworn in as the first President of Namibia watched by Nelson Mandela (just released from prison) and representatives from 147 countries, including 20 heads of state.
On 1 March 1994, the coastal enclave of Walvis Bay and 12 offshore islands were transferred to Namibia by South Africa. This followed 3 years of bilateral negotiations between the two governments and the establishment of a transitional Joint Administrative Authority (JAA) in November 1992 to administer the 780 km² (300 square mile) territory. The peaceful resolution of this territorial dispute was praised by the international community, as it fulfilled the provisions of UNSCR 432 (1978), which declared Walvis Bay to be an integral part of Namibia.