The statement was issued after three days of talks in the southern port city of Aden under the auspices of Ali Abdullah Saleh, the Yemeni president.
It said the two sides would resume dialogue to reach a political settlement guaranteeing the participation of all sides in government.
Committed to dialogue
The Somali speaker said he had reached the deal with Sheikh Sharif Sheikh Ahmed in his capacity as part of the interim authority represented by parliament, the government and the presidency.
The government is committed to dialogue and peaceful solutions, he said.
The agreement was announced after Somalia’s powerful Islamist movement and weak Ethiopian-backed government traded insults on Friday as the two sides moved closer to a war that many fear could engulf the region.
Both sides had appeared to ignore urgent appeals to ease soaring tensions, with the Islamists vowing to attack Ethiopian troops protecting the administration and both sides ruling out new peace talks if the status quo remained.
But Sheikh Sharif Sheikh Ahmed said in Aden that the Islamic Courts were prepared to negotiate with Ethiopia.
The deadline given to the Ethiopians to leave Somalia “does not mean that the Islamic Courts will begin attacking them within a few days if negotiations with them have started [by then]”, he said.
“The weapons held by the Islamic Courts are not meant to attack anyone but to preserve the sovereignty of Somalia and defend the rights of the Somali people,” the militia leader added.
The Islamists have set a Tuesday deadline for Ethiopian troops in the country to leave or face major attacks, an ultimatum that Ethiopia has played down, saying its soldiers will remain as long as the Somali government wants.
The joint statement upheld the agreements already signed by the government and the Islamist militia and rejected “interference in Somali internal affairs by any country in the region”.
It called for respect of borders with neighbouring states and negotiations with these countries to “dispel any fears they might have”.