Somalia's President Abdullahi Yusuf and parliamentary speaker Sharif Hassan Sheikh Adan have signed a deal, agreeing to work together to establish the country's first functioning central government for 15 years.
What is in the deal?
Much of Somalia is in ruins after years of fighting
There is reportedly no mention of the key issue which has divided the two men and their supporters - where the government and parliament should be based.
Mr Yusuf says he is not sure he would be safe in the capital, Mogadishu and so has set up in Jowhar, 90km to the north.
Mr Hassan and the militias who control Mogadishu insist that Mr Yusuf does not have the authority to move the capital.
Under the deal, both sides agree to convene a meeting of parliament on Somali soil for the first time within 30 days.
Parliament will presumably then take the tough decisions concerning the country's future.
Why is the deal important?
Although details are sketchy, it could prove to be a turning point - the end of a "Cold War" between the two men and the start of a commitment to set up a functioning central government and start rebuilding Somalia.
In July last year, it seemed as though the two sides could be on the verge of open conflict, scuttling the 14th attempt to establish peace and security since Somalia fell apart in 1991.
So for the two leaders to be talking to each other is a big step forward.
Donors, who have funded years of talks between rival Somalis, have threatened to stop the flow of money unless the two sides agreed to work together.
Are there any other issues?
The two sides also disagree about whether Somalia needs foreign peacekeepers to disarm the thousands of gunmen who rule the country and ensure stability.
Mr Yusuf wants a peace force but Mr Hassan, the Mogadishu warlords and many MPs are fiercely opposed.
They accused Mr Yusuf of exceeding his authority by moving the capital and inviting foreign troops onto Somali soil.
Mr Yusuf has been close to Ethiopia, which is distrusted by many Somalis. They accuse their neighbour of stirring up trouble in Somalia in order to keep it weak.
Some feared that the president would bring Ethiopian troops into Somalia under the guise of a peace mission.
Mr Yusuf is from the northern region of Puntland and has no support base in Mogadishu. However, many residents say the first thing they want is a government which can establish law and order, even if they have no particular affection for its leader.
What is life like for ordinary Somalis?
Generally pretty awful.
Gun-battles often erupt between the competing factions and civilians are inevitably caught up in the crossfire.
With no national police force, the gunmen are also free to extort money from civilians and businessmen, with only the faction leaders to hold them to account.
New police recruits are being trained but the militias must be withdrawn before they can be deployed on the streets.
The lack of a central government means that services such as schools and hospitals are either non-existent or set up by aid agencies or groups of local people looking after their own area.
But somehow people struggle on and indeed some businesses are managing to thrive.
Many Somalis have fled the country to live in neighbouring countries or the west and send money back to their families left behind.
Why does Somalia matter?
Donors hope that restoring peace and stability in Somalia would end the flow of refugees and even encourage some to return home.
During the years of anarchy, Islamic radical groups have also set up in Somalia.
Somalis have been implicated in terror attacks in East Africa and some fear that if the lawlessness continues, terror groups could gain a stronger foothold in the country, threatening the entire region.