President Mwai Kibaki named opposition leader Raila Odinga as prime minister Sunday, implementing a long-awaited power-sharing deal aimed at resolving a political crisis that left more than 1,000 people dead.

The deal — signed more than a month ago — marks the first time Kenya will have both a president and prime minister. But the working relationship between Kibaki and Odinga, which has been frosty in the past, will determine how long the coalition lasts.

The two men agreed in February to share power after a dispute over who won Kenya's December presidential election triggered weeks of unrest that killed more than 1,000 people and uprooted 300,000 from their homes.

But negotiations over the Cabinet dragged on, and the public grew impatient. Scuffles broke out for three days last week in Kenya's largest slum, Kibera, between police and residents protesting the delay.

On Sunday, Kibaki announced the new Cabinet with the 40 ministries split equally between his Party of National Unity and its allied parties and Odinga's Orange Democratic Movement. Kibaki made the announcement a day after holding closed-door talks with Odinga.

The Cabinet includes two deputy prime ministers: Musalia Mudavadi, the second in command in Odinga's party, and Uhuru Kenyatta, a Kibaki ally and son of Kenyan independence hero and first president, Jomo Kenyatta.

Kibaki and Odinga had come under growing pressure to implement the deal. Former U.N. Secretary-General Kofi Annan had said he was concerned by the slow pace of forming a new government under the deal he brokered, and Secretary of State Condoleezza Rice also called them Monday.

The Kenyan leaders now must try to heal a divided nation, as well as restore one of Africa's most promising economies. Kenya, one of the most tourist-friendly countries in Africa, has seen up to $1 billion in losses linked to the turmoil.

In many regions, the violence brought a bloody end to decades of coexistence among Kenya's ethnic groups, transforming cities and towns where Kenyans had lived together — however uneasily at times — since independence from Britain in 1963.

Legally, the coalition will last until either the current parliament's term ends in 2012 or a new constitution — to be negotiated in the next 12 months — is enacted.

But the focus will be on Kibaki's and Odinga's working relationship. Either side can end the new partnership at any time.

When Kibaki was hurriedly sworn in as president after the disputed December election, Odinga accused him of stealing the vote. Until they signed the peace deal in February, the opposition leader refused to recognize Kibaki as president.

Kibaki, for his part, declined early in negotiations to share any power with Odinga, insisting he was legally elected.