Kenya has adopted a new constitution, but the landmark was overshadowed by an international furore at the presence of Sudan President Omar al-Bashir, whom an international court has indicted for genocide and war crimes.
Watched by tens of thousands of his countrymen, Kenya's President Mwai Kibaki signed the constitution into law at a colourful ceremony in Nairobi's main park on Friday, just over three weeks since it was overwhelmingly endorsed in a national referendum.
"Today is a great day for Kenya," said Kibaki, who took a new oath of office after signing the new charter into law. "This is the most important day in the history of our nation since independence.
The president sparked wild applause as he reverently held aloft a bound copy of the new constitution and executed a slow pirouette to show it off to the crowd and assembled African dignitaries.
The document, overwhelmingly approved in a national referendum earlier this month, is a pillar of reforms aimed at averting a repeat of the violence that killed more than 1000 people following the disputed 2007 election.
But reaction abroad was one of consternation over the attendance of Bashir, one of a handful of heads of state to attend, including Rwanda's Paul Kagame and Uganda's Yoweri Museveni.
The European Union and the International Criminal Court said Kenya had a "clear obligation" to arrest Bashir as a signatory to the court's founding treaty, and the ICC said it was reporting the breach to the UN Security Council.
Kenya's foreign minister, Moses Wetangula, brushed aside the criticism. "He was here today because we invited all neighbours and he is a neighbour."
"There are no apologies to make about anybody we invited to this function because I am sure we are enhancing peace and security and stability of this region more than anything else," he said.
However, deputy defence minister David Musila said Kenya had "brought shame to itself" adding Bashir should be "arrested immediately and handed to the ICC". Bashir, however, was back home in Khartoum within hours.
Hordes of flag-waving Kenyans thronged Nairobi's Uhuru Park (freedom park), where a military parade, a helicopter overflight and a 21-gun salute marked the elaborate ceremony.
"As Kenyans, we should be proud of making history as one of the few nations in the world that have successfully replaced their constitution in peace time," said Kibaki after acknowledging the presence of Bashir by mentioning him by name at the start of his speech.
Bashir was indicted in March 2009 for alleged war crimes and crimes against humanity, and in July 2010 on charges of genocide, relating to atrocities committed by Khartoum's forces in Sudan's western province of Darfur.
The veteran leader, whose name was not on the list of heads of state expected to attend issued by the Kenyan foreign ministry, appeared relaxed and smiling as he shook hands with other African leaders attending the ceremony.
The new law, passed in a referendum earlier this month, replaces Kenya's 1963 independence constitution and maintains a presidential system, but with substantial checks, introduces a devolved system of government and consolidates democracy and basic rights.
New York-based Human Rights Watch called earlier on the Kenyan authorities to either "arrest him or bar him entry" if he were to attend.
"Kenya will forever tarnish the celebration of its long-awaited constitution if it welcomes an international fugitive to the festivities," it said.
The ICC's first-ever warrant against a sitting head of state was issued for Bashir in March 2009 on charges of war crimes and crimes against humanity. The second was issued in July 2010 on charges of genocide.
Bashir in July visited neighbouring Chad, which was at the time strongly criticised by the EU and human rights groups for its refusal to arrest Bashir.
That visit was his first to an ICC member state, although both Chad and Kenya are members of the African Union, which has said the arrest warrants against Bashir are counterproductive for the quest for peace in Darfur.
The ICC has no police and relies on states that support it to carry out arrests.
The United Nations says up to 300,000 people have died since conflict broke out in Darfur in 2003, when ethnic minority rebels took up arms against the Bashir's Arab-dominated regime for a greater share of resources and power.
Sudan's government says 10,000 have been killed.