Mwai Kibaki's re-inauguration as Kenya's president could not be more different from the upbeat and hopeful mood of his 2002 landslide victory.
By Juliet Njeri
BBC News, Nairobi
Back then, the country was awash with optimism as his coalition ended the unpopular 24-year rule of Daniel arap Moi.
President Kibaki's first election win was greeted with elation
But when Mr Kibaki was sworn in for a second time in a hasty ceremony at the end of 2007, violence erupted across the country.
The bitterness of victory is something that Mr Kibaki, a political veteran with service under previous governments, has had five years to become accustomed to.
In 2002, his fairy-tale government was under enormous pressure to deliver on campaign promises: ending endemic corruption, rejuvenating the country's stalled economy and delivering a new constitution.
The public elation soon turned into frustration as the "National Rainbow Coalition dream" slowly turned into a nightmare.
Internal rifts fuelled by a failed power-sharing pact and personal ambitions proved to be the coalition's undoing.
It all started when President Kibaki declined to honour a gentlemen's agreement, popularly referred to as the memorandum of understanding (MoU), on the power-sharing structure in the new government.
Constitutional reform plans were stopped by the opposition
His former opposition comrades, led by Raila Odinga, accused him of betrayal and although they remained in government, they made it clear that they were no longer the president's men.
But the real test for the coalition came in 2005, when his former allies campaigned against the government during the constitutional referendum.
Mr Odinga and other leaders went around the country urging the people to vote against the government, and their victory at the referendum gave birth to a new opposition movement: the Orange Democratic Movement.
Following a bruising defeat, President Kibaki sacked the ministers who opposed the government, in a move interpreted as his boldest decision since ascending to power.
Five years after he was elected on a platform of reform, Mr Kibaki's critics say he has not delivered on the lofty campaign promises.
Foreign diplomats and local activists argue that the corruption which he promised to end still thrives.
His close allies have been implicated in multi-million dollar scandals, such as the infamous Anglo-leasing deal.
President Kibaki's confidants - the then Finance Minister David Mwiraria and his counterpart in Justice and Constitutional Affairs, Kiraitu Murungi - were forced to resign after being implicated in the deal.
Yet the two were reinstated to the cabinet even before investigations into the scandal were complete.
This perceived failure to take action has lost Mr Kibaki considerable goodwill.
President Kibaki's laid-back management style has also come in for criticism.
Some argue that his ministers have resorted to making unilateral decisions that have been very unpopular.
For instance a government decision to support the extradition of terrorism suspects to Ethiopia and later to US detention camp in Guantanamo bay in Cuba has left a bitter taste among Kenyan Muslims: a key voting block.
On the other hand, his supporters say his tolerance to dissenting opinions, even within his own cabinet, has opened up democratic space.
Before the elections, opinion polls suggested he might lose to Mr Odinga, the man who made him king.
And in a bizarre twist, the Kanu party which Mr Kibaki defeated in 2002, joined his Party of National Unity.
Mr Moi (r) now backs Mr Kibaki
Both Mr Moi and Mr Kenyatta, who was Kanu's defeated candidate, backed their former nemesis.
But despite this, even President Kibaki's strongest critics do not deny that his administration has breathed some life into the economy.
National income grew by 6% in 2006.
President Kibaki is also being credited for improving the business environment for local investors.
The introduction of universal free primary education has endeared him to the poor, and he has promised the same for secondary schools.
But it is not clear how the government will pay for this. Already, the quality of primary education has dropped due to the lack of teachers and facilities to match the demand.
As expected, ethnicity affected voting patterns, and President Kibaki got support in Central province, home to his Kikuyu people: the country's largest grouping.
Supporters praise President Kibaki for bringing democracy
His challenge, political analysts say, will be to consolidate the PNU coalition, a new alliance of parties formed only in September.
His opponents say Mr Kibaki, aged 75, should step down and allow a younger leader to take over.
Despite health problems threatening to cloud his tenure in office, President Kibaki now appears robust and has maintained a gruelling pace at campaign meetings.
With his re-election, he has become Kenya's longest-serving MP, having first been elected in 1963.
Despite all the deflated hopes, the veteran campaigner has staged a surprise comeback.