In 1966, the General Assembly passed resolution 2145 (XXI) which declared the Mandate terminated and that the Republic of South Africa had no further right to administer South West Africa. In 1971, acting on a request for an Advisory Opinion from the United Nations Security Council, the ICJ ruled that the continued presence of South Africa in Namibia was illegal and that South Africa was under an obligation to withdraw from Namibia immediately. It also ruled that all member states of the United Nations were under an obligation not to recognise as valid any act performed by South Africa on behalf of Namibia.