The UK annexed Southern Rhodesia from the South Africa Company in 1923. A 1961 constitution was formulated to keep whites in power. In 1965 the government unilaterally declared its independence, but the UK did not recognize the act and demanded voting rights for the black African majority in the country (then called Rhodesia). UN sanctions and a guerrilla uprising finally led to free elections in 1979 and independence (as Zimbabwe) in 1980. Robert Mugabe, the nation's first prime minister, has been the country's only ruler (as president since 1987) and has dominated the country's political system since independence.