Why Western Sahara is not an African country?

Formerly the Spanish colony of Spanish Sahara, Western Sahara is a disputed territory which has been claimed by both the Kingdom of Morocco and the Popular Front for the Liberation of the Saguia el Hamra and Rio de Oro (Polisario Front). The latter is an independent movement based in Algeria. Western Sahara is listed by the United Nations (UN) as a non-decolonised territory and is thus included in the United Nations list of Non-Self-Governing Territories.