KAMPALA (Reuters) - Somalia's feuding leaders agreed on Thursday to extend the mandate of both government and parliament for a year and hold elections by August next year.
The mandate for Somalia's latest transitional government was meant to expire in August but President Sheikh Sharif Ahmed, a former Islamist rebel leader, and speaker Sharif Hassan Sheikh Aden, who covets the top job, had been at loggerheads over what should happen then.
"We agree to defer elections of the President and the Speaker and his deputies for twelve months after August," a deal signed by the Somali president and speaker in Uganda said.
"Elections for President and Speaker of Parliament will have to take place prior to August 20, 2012."
The deal also demanded the prime minister resign within 30 days of the agreement, signed in the presence of Uganda's President Yoweri Museveni and U.N. Special Envoy for Somalia Augustine Mahiga.
"Within thirty days of the signing of this Agreement ... the President will appoint a new Prime Minister," the agreement said.
"Parliament will endorse the new Prime Minister within 14 days of the submission of the PM Nominee by the Office of the President."
Political analysts had said the row between the country's two most powerful politicians had ground government activity to a halt. African peacekeepers fighting to prop up Sharif's government against Islamist militants had warned the dispute risked unraveling the military gains made against the rebels.
International patience has been wearing thin at the slow pace of reform in Somalia.
(Editing by George Obulutsa)