Kenyan President Mwai Kibaki and opposition leader Raila Odinga signed a power-sharing agreement today intended to end a post-election crisis that left 1,000 people dead.
Crowds of onlookers clapped as the two rivals inked a deal at a televised ceremony to set up a coalition government and create a prime minister's post for Odinga after negotiations mediated by former UN chief Kofi Annan.
The two leaders had come under intense pressure to compromise over Kibaki's disputed re-election in a 27 December vote, which forced 300,000 people to flee their homes amid ethnic violence and severely damaged Kenya's reputation as a stable regional economic hub.
Besides the prime minister's job Odinga has sought since he helped first elect Kibaki in 2002, the deal will also give cabinet posts based on each party's strength in parliament.
Odinga's Orange Democratic Movement (ODM) has the largest number of seats.
Cabinet portfolios would be balanced along the same lines, Annan said.
"Compromise was necessary for the survival of this country," Annan said after the signing.
"I commend all those whose efforts have made this possible ... they kept the future of Kenya always in their sights and reached a common position for the good of the nation."
The deal also includes a full review of the constitution, a 45-year-old document which many Kenyans have pushed to change since the 1990s because it gives the president nearly total authority over the affairs of state.
Today's talks brought Odinga and Kibaki to the same table for the first time in a month, after discussions between their parties hit a deadlock earlier in the week.
"As a nation there are more issues that unite than divide us. We've been reminded we must do all in our power to safeguard the peace that is the foundation of our national unity ... Kenya has room for all of us," Kibaki said in his speech afterward.
A beaming Odinga said: "We have opened a new chapter in our history, from the era of confrontation to the beginning of cooperation."
"We should begin to ensure that Kenyans begin to celebrate and love each other, that we destroy the monster that is called ethnicity," he said.
In his opposition stronghold of Kisumu on the shores of Lake Victoria in Kenya's west, residents took to the streets celebrating and ululating over the deal, witnesses said.
The crisis exploded after Kibaki was sworn in on 30 December and Odinga claimed the election was rigged.
Kibaki said he won fairly and blamed his rival for inciting violence and unrest instead of going to court to challenge the result - the closest in Kenya's post-independence history.
Protests turned into riots and looting sprees met with a forceful police response and simultaneously, ethnic attacks by opposition backers on Kibaki's Kikuyu tribe exploded and later unleashed reprisal killings that left at least 1,000 dead.
As the talks got bogged down last week, the opposition threatened to hold more street protests - its only real leverage left - but Odinga called them off after Annan, a former UN secretary-general, asked him to do so.