Sam Nujoma, the founding president of an independent Namibia, who led a Soviet-backed guerrilla army in an uneven fight against the vastly superior forces of white-ruled South Africa in a victory that owed much to the dynamics of the Cold War, died Saturday in Windhoek, Namibia’s capital. He was 95.

Nangolo Mbumba, the country’s current president, announced the death. He did not give a cause but said the former president had been hospitalized for three weeks.

Praising Nujoma as one who had “heroically marshaled the Namibian people during the darkest hours of our liberation struggle,” he said a period of national mourning would be announced.

A bearded, bespectacled man given to trading his camouflage fatigues for business suits, depending on his audience, Nujoma pursued twin tracks of diplomacy and insurgency in a decades-long quest for the liberation of his country — a sprawling but sparsely populated former German colony that South Africa ruled in defiance of the United Nations.

— The New York Times