Muhammad Ali Gedi, the prime minister, flew into the south-central city of Baidoa, escorted by heavily-armed militiamen, to join the president and Sharif Hassan Sheikh Adan, the parliament speaker, for a meeting on Sunday that many say is the last hope for a divided administration paralysed for more than a year.
It is the 14th attempt to restore central government to Somalia, whose last national president was overthrown by militias in 1991, ushering in an era of anarchy.
It was also the first parliamentary session since a meeting in neighbouring Kenya last year ended with lawmakers brawling, throwing chairs and smashing a ballot box.
Hassan said: "Today is a historic day. The government formed in Kenya has finally met inside the country after some differences."
Yusuf said: "There is need to agree and work on national security, which is the basis for the country's peace."
The parliament met in Baidoa as it was considered a neutral site by both factions in the divided government.
But a coterie of powerful Mogadishu regional commanders, including Mohamed Qanyare, the minister for national security, stayed away.
They lead a faction, fronted by Hassan, that wants the government based in the lawless capital, Mogadishu, and does not want foreign peacekeepers in the Horn of Africa country.
Conflict and famine have killed
hundreds of thousands in Somalia
Yusuf, Gedi and their allies have based the government in the provincial town of Jowhar, 90km north of Mogadishu.
They say they cannot move to the capital until thousands of militiamen are pacified, and they want foreign peacekeepers to help to do the job.
Gedi, whom some MPs have said they wanted to remove, called the meeting a victory for the government, which has been deeply split and has done almost nothing since its formation in Kenya in late 2004.
"I think we should ask the Somali people to forgive us for lost time," he told the 205 deputies present out of a total of 275.
Disagreements over the seat of government, peacekeepers and other political intrigues have left the two sides deeply divided, but legislators plan to tackle those issues or face further failure, which many of them say would render the government unable to impose any authority.
The president proposed that legislators spend at least a week reconciling.
Yusuf also urged parliament to set rules for their duties and make plans to tax citizens to fund local governments.
There were no plans for any debate on Sunday after the speeches had finished and the session closed for the day.
Yusuf urged the taxing of citizens
to fund local governments
It was due to re-open on Monday, Mohamed Abdi Hayr, the minister for information, said.
Almost 500 uniformed police officers patrolled the potholed streets outside the temporary parliament building, a change from the 1000 or so militiamen who are usually there but have been forced to camp outside the city during the meeting.
About 15 diplomats from the United Nations, African Union, Arab League, Italy, Sweden and other countries were present.