Kenyan President Mwai Kibaki will step down after more than a decade in power that spanned some of the country's most violent periods, but also saw a new constitution that has brought hope for change.
A veteran politician from the birth of independent Kenya, Kibaki, 81, will retire after March 4 polls, leaving a legacy of impressive economic growth partly overshadowed by rampant government corruption.
For a leader who was popularly swept into power in 2002 on an anti-corruption platform, Kibaki's tenure saw grotesque graft scandals where hundreds of millions of dollars were siphoned from public coffers.
Kibaki's National Rainbow Coalition -- which took power from the authoritarian rule of Daniel Arap Moi -- was welcomed for its promises of change and economic growth, but soon showed it was better suited to treading established paths.
"The initial response to corruption was very solid ... but it became clear after a while that these scams reached all the way to the president himself," said Kenya's former anti-corruption chief John Githongo in Michela Wrong's book "It's Our Turn to Eat".
Most notorious of a raft of graft scandals was the multi-million dollar Anglo Leasing case, which emerged in 2004 and involved public cash being paid to a complicated web of foreign companies for a range of services -- including naval ships and passports -- that never materialised.
Yet Kibaki also boosted education and health sectors that were reeling from mismanagement under previous regimes, as well as launching ambitious infrastructure projects including large- scale road building.
His government introduced free basic education for children aged between six and 13, and revamped hospitals and clinics closed under Moi.
Closer ties to China have also boosted Kenya's role as the economic powerhouse of east Africa, even if critics say Kibaki's drive for growth has come at a potential longer term cost for the nation.
"He will be remembered as the president who pursued expansionist economics... and one who borrowed the most leading us deeper into debt," said Peter Kenneth, a minister under Kibaki and now a presidential candidate.
Kibaki's recent large-scale and flagship projects -- started but far from completed -- include the development of the super-port of Lamu as a second harbour to rival overstretched Mombasa, a transport hub for multiple nations.
Last month Kibaki also broke ground on the Konza project, a proposed giant Internet technology and business hub dubbed "Africa's Silicon Savannah" which, it is hoped, will create more than 200,000 jobs by 2030.
But golf-loving Kibaki, who is expected to retire with a golden sendoff of $180,000 plus $75,000 a year for life, also led the country during the most violent election in its history, when over 1,100 died in bloody ethnic battles after disputed 2007 polls.
--- Complicated legacy for his successor --
Kibaki, after a contentious win that the opposition decried as rigged, was hurriedly sworn-in for a second term, prompting further violence that was resolved only after former UN chief Kofi Annan helped broker a deal.
The crisis rocked what had until then been Kibaki's most popular achievement -- a stable economy -- with hundreds of thousands forced from their homes, and Kenya's lucrative tourist industry left in tatters.
Kibaki, who grew up in a simple farming family in Kenya's highland Nyeri district, excelled at school. He later studied economics and political science at Uganda's prestigious Makerere University and then the London School of Economics.
Kenya's longest serving parliamentarian -- elected in 1963, and swiftly rising to be trade minister three years later -- he was also part of the team that drafted Kenya's 1963 independence constitution.
In the chaotic aftermath of the 2007-8 post-poll violence, Kibaki would find himself in the unusual position of presiding over a referendum that overwhelmingly endorsed a new constitution aimed at averting a repeat of the violence.
The 2010 constitution maintained a presidential system, but introduced substantial checks with a devolved system of government, and consolidated democracy and basic rights.
"His greatest moment was the promulgation of the new constitution... It was a very deep and emotional moment for him," Kibaki's son Jimmy said in a recent documentary.
In the future, the elderly statesman -- who was left with serious long-term injuries following a bad car crash in 2002 -- is expected to enjoy his retirement on the golf courses of Nairobi and his sprawling estates in his birthplace of Nyeri.
But Kenya's third president leaves a complicated legacy for his successor.
Leading contender Uhuru Kenyatta -- who in 2007 put his presidential ambitions on hold in favour of Kibaki -- faces a crimes against humanity trial for the 2007-8 violence that erupted under Kibaki's rule.
The legacy of that same violence may also dog the future for the other top candidate Raila Odinga, whose 2007 presidential bid ended with him reluctantly settling for the prime minister's post after Kibaki's contentious win.