 On 1 July 1985, Pienaar was appointed by the National Party government to be Administrator-General (AG) of South-West Africa, a territory that the United Nations Security Council called Namibia and which UNSC Resolution 435 of 1978 declared was being administered illegally by South Africa.Two years after AG Pienaar's appointment, when prospects for Namibian independence seemed to be improving, UN Commissioner for Namibia (UNCN) Bernt Carlsson, was appointed.Upon South Africa's relinquishing control of Namibia, Commissioner Carlsson's role would be to take over the administration of the country on behalf of the UN, formulate its framework constitution, and organise free and fair elections based upon a non-racial universal franchise.