NAIROBI--Former Kenyan President Daniel arap Moi, who has died aged 95, held power for longer than any other leader since independence and left a legacy of corruption that still haunts the East African nation today.
Moi was usually pictured carrying an ivory baton and described by critics as a virtual dictator. But, for all its poverty, he left Kenya more stable than many other countries in the region emerging from colonial rule.
The then vice-president came to power in 1978 when President Jomo Kenyatta died. Diplomats said an attempted coup four years later transformed him from a cautious, insecure leader into a tough autocrat.
His government set up torture chambers in the basement of Nyayo House, a building in Nairobi's city centre that now houses the immigration department. Thousands of activists, students and academics were held without charge in the underground cells, some of them partly filled with water. Prisoners say they were sometimes denied food and water.
He won elections in 1992 and 1997 amid divided opposition. But he was booed and heckled into retirement when term limits forced him to step down in 2002 and he lived quietly for years on his sprawling estate in the Rift Valley.
Born a cattle herder's son in a village 200 km (125 miles) northwest of Nairobi in 1924, Moi was a headmaster before entering politics in the 1950s. He succeeded in keeping Kenya relatively stable compared to many of its troubled neighbours, working for regional peace, and eventually he introduced political pluralism.
But he floundered badly on the economy as poverty deepened and corruption flourished. A 2004 report by corporate investigations firm group Kroll accused Moi and his inner circle of stealing $2 billion of state funds - an accusation dismissed at the time by the government.
One major scandal on his watch, "Anglo Leasing", began in the 1990s and involved state contracts worth hundreds of millions of dollars being awarded to non-existent firms. Another scam, "Goldenberg", led to the loss of at least $1 billion from the central bank via compensation payments for bogus gold and diamond exports.
The economy nosedived in the late 1990s as tea and coffee prices slid. Donors froze lending, citing concerns about corruption. Crumbling infrastructure scared off investors.
Moi pulled the strings of Kenya's tribal politics throughout his time in power, despite having an uncharismatic presence often underestimated by less canny opponents. He belonged to the small Kalenjin tribe but kept control through links to other small tribes, exploiting their fear of domination by large communities such as the Kikuyus and Luos.
He resented the Kikuyus' attempts to block his appointment as president when independence leader Kenyatta died and he made scores of prominent business and political appointments from his ethnic group.
Kenya's only coup attempt, in 1982, did immense damage to the country's reputation for stability and Moi soon changed the constitution to legalise de-facto one-party KANU rule. Moi retained symbols of democracy such as regular parliamentary elections but critics said government interference was so pervasive that Kenya was a virtual dictatorship.
He chipped away at parliament's authority and exercised almost unlimited power. "“Everyone should sing like a parrot after me," was one of his frequent sayings.
Moi barely survived demands for his resignation over the 1990 murder of Foreign Minister Robert Ouko, a prominent Luo leader. In 2010, a government inquiry into the death, presented to parliament five years after it was written, said the murder was carried out in one of Moi's official residences.
Under international attack for rights abuses and corruption, Moi announced in 1991 that multi-party elections would be held for the first time in 25 years. But the opposition remained divided.
In 2002, Moi surprised all observers by allowing free elections that dealt his youthful protege Uhuru Kenyatta a crushing defeat. "That is the way democracy goes," Moi said after results were announced.
Kenyatta, son of the country's first president, was finally elected president in 2013 and is serving his second and final term.