, who has died aged 90, ushered in economic reforms and a new constitution but failed to deliver on promises to combat graft and his tenure was marred by a disputed re-election which led to deadly violence
A British-educated economist, Kibaki's unflappable demeanour concealed political guile that finally propelled him to the presidency after four decades as lawmaker, government minister and then vice president to his predecessor, Daniel arap Moi.
His landslide win in 2002 upset Moi's handpicked successor. Kibaki, in a wheelchair and a leg cast after a car crash, promised his ecstatic inauguration crowd a clean break from Moi's autocratic quarter-century rule.
The honeymoon did not last long, and cracks soon appeared in NARC, an alliance of parties opposed to Moi.
Raila Odinga, one of NARC's leaders, accused Kibaki of violating a secret, pre-election pact that guaranteed Odinga would become prime minister.
Instead, Kibaki appointed Odinga minister for roads, angering his base and sowing the seeds for a bitter showdown between the two that was to spill into violence at the next election in 2007, causing the deaths of 1,250 people.
Kibaki also angered voters by failing to tackle widespread corruption, and his ministers embraced the same corrupt businessmen who had flourished under Moi.
British High Commissioner Edward Clay memorably summed up donors' view of government graft in a 2004 speech: "Their gluttony causes them to vomit all over our shoes."
In the heady first days of his administration, Kibaki had appointed John Githongo, a prominent activist, as his anti-graft czar. But Githongo fled to Britain in 2005 after uncovering a multi-million dollar passport printing scam involving senior cabinet ministers. He later became a vociferous critic.
Kibaki's fiscal prudence and infrastructure projects breathed life back into Kenya's sluggish economy. He also ended many restrictions on freedom of expression.
But his disputed 2007 re-election tarnished his legacy.
Opposition leader Odinga was ahead by several hundred thousand votes when the electoral commission abruptly stopped announcing the results and ejected journalists. Hours later, the commission announced Kibaki had won by a narrow margin and he was hurriedly sworn in.
Most election observers said the elections were flawed. Odinga called for protests, sparking a deadly police crackdown. Ethnic violence flared in Nairobi's slums, the Rift Valley highlands and the lakeside city of Kisumu. Families were burned alive in a church.
Former U.N. chief Kofi Annan finally brokered a peace deal between Kibaki and Odinga. The two formed a grand coalition government, with Odinga as prime minister.
The coalition survived five years of squabbling, enacting a new constitution in 2010 that devolved some powers from the presidency to the counties, part of an effort to end the nation's winner-take-all elections.
The son of a tobacco trader, Kibaki grew up amid lush tea and coffee fields near Mount Kenya in the central highlands. He attended Kampala's Makerere University before becoming the first African to earn a first-class degree from the London School of Economics.
He returned to Makerere as an economics lecturer in 1958 during a wave of African independence movements. When Kenya became independent, he was elected to parliament and became an aide to founding President Jomo Kenyatta. Two years later, he was appointed commerce and industry minister.
He served as finance minister for 13 years under both Kenyatta and Moi, and as Moi's vice president for some of that time, until Moi moved him to lesser ministries during a spat that eventually pushed Kibaki into the opposition in 1992.
Kibaki was among Kenya's richest men, overseeing vast land holdings and business interests.
When he handed over power to his successor, Uhuru Kenyatta, in 2013, Kibaki retreated to his home in one of Nairobi's plushest neighbourhoods, close to his beloved Muthaiga golf club. He is survived by several children and grandchildren.