Namibia's President Hage Geingob, 82, died at Lady Pohamba Hospital in Windhoek, where he was receiving treatment, early on Sunday, the presidency said, weeks after he was diagnosed with cancer.
Geingob had been in charge of the thinly populated and mostly arid southern African country since 2015, the year he announced he had survived prostate cancer.
Vice President Nangolo Mbumba takes the helm in Namibia - a mining hotspot with significant deposits of diamonds and the electric car battery ingredient lithium - until presidential and parliamentary elections at the end of the year.
A presidency post on social media platform X did not give a cause of death, but late last month the presidency said he had travelled to the United States for "a two-day novel treatment for cancerous cells", after being diagnosed following a regular medical check-up.
Born in 1941, Geingob was a prominent politician since before Namibia achieved independence from South Africa in 1990.
He chaired the body that drafted Namibia's constitution, then became its first prime minister at independence on March 21 of that year, a position he retained until 2002.
'CHAINS OF INJUSTICE'
In 2007, Geingob became vice president of the governing South West Africa People's Organisation (SWAPO), which he had joined as an agitator for independence when Namibia was still known as South West Africa.
SWAPO has remained in power in Namibia unchallenged since independence. The former German colony is technically an upper middle-income country but one with huge disparities in wealth.
"There were no textbooks to prepare us for accomplishing the task of development and shared prosperity after independence," he said in a speech to mark the day in 2018. "We needed to build a Namibia in which the chains of the injustices of the past would be broken."
Geingob served as trade and industry minister before becoming prime minister again in 2012.
He won the 2014 election with 87 per cent of the vote but only narrowly avoided a runoff with a little more than half the votes in a subsequent poll in November 2019.

Reopening of Gaza's Rafah crossing expected Monday
Winter storm death toll in United States reaches 90
Pakistan says 145 militants killed after attacks in Balochistan
Israeli strikes kill 26 in Gaza, health officials say
US government starts likely brief shutdown as House fails to approve deal
Thousands demonstrate in Minnesota and across US to protest ICE
France tightens infant milk rules after recalls
Modi ally proposes social media ban for India's teens as global debate grows
