Kenyan President Mwai Kibaki and opposition leader Raila Odinga signed a power-sharing agreement Thursday in an attempt to end an ongoing political crisis that has left more than 1,000 people dead.

The rival leaders have been battling for power since the country's disputed Dec. 27 presidential election -- which monitors claim was fixed.

Following the election, widespread violence erupted in Kenya between supporters of both parties.

Kibaki and Odinga signed the deal Thursday during a ceremony televised throughout the country, reports Reuters.

"We have a deal," former UN chief Kofi Annan, who help mediate the negotiations, said Thursday at the ceremony.

Under terms of the agreement, cabinet posts will reflect the strength that each party holds in parliament, Reuters reports.

Annan met with Kibaki, Odinga and African Union head Jakaya Kikwete earlier Thursday to finalize the deal.

While post-election violence has subsided in recent weeks, more than 1,000 people have been killed and at least 600,000 forced from their homes in the last two months.

On Wednesday, there were indications from both sides that a deal was imminent. Odinga's supporters called off planned protests and Kibaki vowed to create a prime minister's post -- a key demand of his rivals.

The leaders have been under increasing international pressure, including from the United States.

Earlier this month, U.S. Secretary of State Condoleezza Rice said her country's relationship with Kenya hinged on a political solution being reached.

With files from The Associated Press