Namibia’s President Hage Geingob has died at the age of 82 while receiving medical treatment at a hospital in the capital, Windhoek.
A veteran of the country’s independence struggle, Mr Geingob had been diagnosed with cancer and revealed the details to the public last month.
He died early on Sunday with his wife and children by his side, Vice-President Nangolo Mbumba announced.
Namibia “has lost… a distinguished servant of the people”, he said.
According to the constitution, Mr Mbumba will now act as president as there was less than a year left of Mr Geingob’s second term in office. Presidential and parliamentary elections had already been scheduled for November.
The exact cause of the president’s death was not given but last month he underwent “a two-day novel treatment for cancerous cells” in the US before flying back home on 31 January, his office had said.
Leaders from around the world have been sending condolence messages.
Among them is Cyril Ramaphosa, president of neighbouring South Africa, who described him as “a towering veteran of Namibia’s liberation from colonialism and apartheid”.
Mr Geinbob, a tall man with a deep, gravelly voice and a commanding presence was a long-serving member of the Swapo party. It led the movement against apartheid South Africa, which had effectively annexed the country then known as South West Africa.
He lived in exile for 27 years, spending time in Botswana, the US and the UK, where he studied for a PhD in politics.
Mr Geingob came back to Namibia in 1989, a year before the country gained independence.
He became president in 2015 and was in his second and final term in office.
He had already been the country’s longest-serving prime minister – in the post for 12 years from 1990 and then again for a shorter stint in 2012.
Swapo, which has been in power since independence in 1990, had chosen Netumbo Nandi-Ndaitwah as its presidential candidate for November’s planned elections.
She is currently the deputy prime minister, and will become the country’s first female president if she wins.