See more of the story

Daniel arap Moi, the autocratic president of Kenya from 1978 to 2002, who ruled his East African nation in a postcolonial era of political repression, economic stagnation and notorious corruption, but in the end gave up power peacefully, died on Tuesday at Nairobi Hospital in the capital. He was 95.

President Uhuru Kenyatta declared a period of national mourning and said Moi would receive a state funeral.

Fifteen years after Kenya won independence from Britain in 1963, Moi became president after the death of Jomo Kenyatta, the country's founding father. Moi, a former schoolteacher and national legislator, had been a hand-picked vice president and served in Kenyatta's shadow.

Unlike the imperial Kenyatta, who governed behind closed doors, Moi traveled the country, courting its ethnic and tribal groups and gaining wide popularity. He introduced free milk for children, and pledged to do away with endemic graft and elevate Kenya's struggling tourism-and-agriculture economy. He won Western support with anti-communist policies during the Cold War.

But after suppressing opposition and consolidating power in a single-party state, he began a 24-year dictatorial reign. Moi — with his nimbus of silver hair, buttonhole rose and ivory walking stick — dominated life in Kenya. He put his face on bank notes, ordered his portrait hung in offices and shops, enriched his family and tribal cronies and, as investigations showed, stashed billions in overseas banks. For much of his tenure, it was illegal even to speak ill of him.

As the head of state and government, he exercised absolute power. Opposition led by intellectuals arose. But Moi, who also controlled the news media and the police and military services, and whose pronouncements had the force of law, closed the universities and suppressed his opponents with detentions, torture and killings, said United Nations investigators and human rights organizations.

Constitutionally barred from running in the 2002 elections, he agreed to give up power in a smooth transfer that was then still rare in Africa. He supported a son of Jomo Kenyatta, but Mwai Kibaki, who had lost to Moi in 1992 and 1997, and who was nearly killed in a traffic accident during the campaign, won the presidency by a 2-1 margin.

Moi's successors found even more corruption and human rights abuses than had been suspected. A 2003 inquiry exposed torture cells at Nyayo House in Nairobi, a government building where dungeons yielded evidence supporting victims' accounts.

Moi was never prosecuted, though corruption inquiries implicated him and his family. In 2003, Kenya found $1 billion in stolen funds in overseas accounts. Others in his administration were pursued, but Moi was treated as an elder statesman.

He was born Toroitich arap (son of) Moi on Sept. 2, 1924, in Kuriengwo, a Rift Valley village. His father, a herdsman, died when the boy was 4. In a nation dominated by the Kikuyu tribe and its chief rival, the Luo, the Moi family belonged to the Kalenjin minority, one of 70 tribal groups.

At the African Mission School at Kabartonjo, Moi became a Christian and adopted the name Daniel. He graduated from Kapsabet Teacher Training College; from 1945 to 1947, he taught classes, and he was later the headmaster of a government school.

After leaving the presidency, he lived quietly, largely shunned by Kenya's political establishment, but drew crowds in public. In 2007, he was named a special envoy to Sudan.