NAIROBI, Kenya — Kenya's opposition leader was sworn into office as the country's prime minister Thursday, fulfilling a key step in a power-sharing deal aimed at ending a violent political crisis in the East African nation.

More than 1,000 people have died in fighting and 300,000 were displaced since the December elections that both Raila Odinga and President Mwai Kibaki claimed to win. With the violence escalating, the rivals agreed in February to share power — but then wrangled for weeks over how to divide up their coalition Cabinet.

On Thursday, 40 Cabinet ministers took up their positions, 20 each from Kibaki's and Odinga's camps. Kibaki's party retained the key finance and internal security ministries and Raila's allies will head up agriculture and oversee local government.

The entire government, including Odinga, swore an oath of loyalty to the president.

"Kenyans will be watching your performance and they'll judge you by the services you deliver," said Kibaki, whose first term delivered strong economic growth but failed to crack down on violent crime and corruption.

Meanwhile, with the task of devising a power-sharing Cabinet solved, Kenya's new government faced its first challenge: the Mungiki gang that has been terrorizing the capital, Nairobi.

"I want to tell our brothers the Mungiki we shall talk to them," Odinga said at the inauguration ceremony. "We should speak together as Kenyans."

The gang has lashed out with violence over the deaths last week of two relatives of key gang members — killings they blame on police.

At least 13 people died Monday and at least one person was killed Thursday in the eastern part of the capital, police official Patrick Mangoli said. He said the gang also tried to burn down a local official's camp overnight in the same part of the city but their gasoline bombs failed to burn properly.

The Mungiki also have shut down public transport in large parts of the capital by threatening to behead bus drivers and commuters. Gang members brandishing machetes and sticks manned roadblocks in some parts and police warned Thursday that criminals were intent on "hijacking" a Friday funeral for a gang leader's murdered wife.

Kenya, for years one of the most stable nations in East Africa, is a key U.S. ally and a regional economic and military powerhouse. But the disputed December elections laid bare frustrations over poverty and corruption and ethnic rivalries in a country where Kikuyus — the tribe Kibaki belongs to — are perceived to dominate others, including the Luo, Odinga's ethnic group.

"There's lots of work ahead. Constitutional reform, land reform, the program that will create employment for the youth," former U.N. chief Kofi Annan, who brokered the deal, reminded the two leaders.

Many Kenyans backed a joint government to resolve the political standoff — but balked at expanding the government at a time when hundreds of thousands are homeless from the violence earlier this year.

Groups like anti-corruption watchdog MARS Kenya have criticized the size of the Cabinet, the largest in Kenya's history and one whose efficiency will be tested by distrust and political rivalry. The government already has asked international donors for half a billion U.S. dollars to help rebuild the country.

Activist Mwalimu Mati described such a dramatic increase in the number of posts in a country notorious for corruption as "putting out the fire with gasoline."

Civil groups peacefully protested the size of the Cabinet two weeks ago before being dispersed by police armed with tear gas.

But Odinga urged Kenyans — many of whom scrape by in polluted slums on less than a dollar a day in his own constituency: "Don't look at the size of the Cabinet but its product."