His father, Daniel Utoni Nujoma, and his mother, Mpingana-Helvi Kondombolo, worked the land. As a boy, Mr. Nujoma said in his memoir, he tended the family cattle and goats, carrying a baby on his back to free his mother to work in the fields.

With only modest formal education, Mr. Nujoma moved at age 17 to the coastal enclave of Walvis Bay, where he worked at a general store and a whaling station before relocating to Windhoek as a cleaner on the railroad system. After hours, he studied English at night school. In 1956, he married Theopoldine Kovambo Katjimne. They had three sons, and a daughter who died at 18 months. Mr. Nujoma was in exile by then and unable to attend her funeral, he wrote, because the police would have arrested him.

In the late 1950s, as Ghana’s independence from Britain in 1957 became an emblem of liberation for many Africans, Mr. Nujoma was associated with organizations that were forerunners of SWAPO, notably the Ovamboland People’s Organization. He left for exile in 1960 over his role in protests against the forced removal of Black people from one segregated township to another. In 1966, his organization launched the first tentative military operations of its armed struggle. Over the years, thousands of young Namibians joined the insurgents’ ranks.

South Africa sought to belittle its war with SWAPO as a low-intensity conflict, but that belied its increasing commitment of military forces. “Despite major efforts by South Africa over 20 years,” Bernard E. Trainor, a military correspondent for The New York Times, wrote in July, 1988, “the Namibian rebels’ strength, now estimated at 8,000, appears undiminished.”

SWAPO’s military traditions endured after independence when Namibia’s regular army was deployed in support of the Congolese president, Laurent Kabila, in 1998 and to put down a secessionist revolt in the northeastern Caprivi Strip in 1999.