Instead, his handpicked successor, João Lourenço, the defense minister popularly known as “JLo,” rallied supporters at a mass gathering in the capital.

Mr. dos Santos may be the “force of the present,” he said. Yet “I am seeing a citizen, wearing a red tie,” Mr. Lourenco said of himself, “who with your support is going to be the force of the future.”

Such words would have been unutterable just a few months ago in Angola. But now, in a rare moment for Africa, a strongman whose image has become inseparable from his country’s and whose tenure has spanned generations, says he is going to step down — voluntarily.

For many Angolans, an Angola without Mr. dos Santos at the top is hard to imagine.

“Our president is omnipresent,” said Luaty Beirão, 35, a rapper and critic of the government who, like most Angolans, was born after Mr. dos Santos became president. “He’s on our money. He’s on our IDs. He’s in our heads. He’s everywhere.”

Mr. dos Santos, known as much for his inscrutability as his political longevity, has not given a public reason for stepping down. But he will leave behind a coterie of leaders like President Robert Mugabe of Zimbabwe, 93, who has been in power for 37 years, and President Teodoro Obiang Nguema Mbasogo of Equatorial Guinea, 74, who has ruled for close to 38 years, beating Mr. dos Santos by just a few weeks.