The burial was on the outskirts of Windhoek following 20 days of mourning.

Soldiers gave Geingob a 21-gun salute while K-8 fighter jets flew past.

Geingob, 82, Namibia's two-time prime minister and third president since its independence from minority-ruled South Africa in 1990, has been in charge of the sparsely populated and mostly arid southern African nation since 2015.

He was serving his final year in office.

A veteran of the country's independence struggle, Geingob lived in exile for 27 years, spending time in Botswana, Zambia and the U.S. before returning to Namibia in 1989.

He held several senior positions in government and in his party, South West African People's Organisation (SWAPO), including chairing the body that drafted Namibia's constitution, considered a model of good governance and the rule of law.

As Namibia's first prime minister, Geingob is credited for introducing modern management approaches to the running of the government.

"Your impact on us has been profound, your footprint on this nation is immense," said Nangolo Mbumba, interim president at the funeral. "You leave our country in better shape ... You have left us with an economic roadmap towards prosperity," he added.

Namibia is considered a middle-income country with abundant diamonds, uranium and lithium reserves needed for electric car batteries.

Recently, the country has made efforts to attract foreign investment in the global green economy by becoming the first African country to agree to supply the European Union with green hydrogen and minerals needed for clean energy.

Namibia, a former German colony, is scheduled to hold presidential and parliamentary elections in November.

(Reporting by Nyasha Nyaungwa; editing by Kopano Gumbi and David Evans)

By Nyasha Nyaungwa