Yusuf returned to the Villa Somalia, the bullet-riddled palace of former dictator Mohamed Siad Barre, where he was due to meet with traditional Somali elders, the Associated Press reported.
Mogadishu had been under the lawless rule of warlords since a 1991 coup ousted Barre. In June, however, Islamist fighters, backed by the Somali Islamic Courts Council or SICC, launched a campaign against the warlords and forced them out of the city.
Under threat of an Islamist takeover of the country, the Somali government bolstered by a major force of Ethiopian troops fought back the Islamists in recent weeks, driving them from several towns and cities and from the capital.
"The president has arrived. He is now in Villa Somalia," government spokesman Abdirahman Dinari said, according to Reuters. "He urged all Somalis to forget the past and prepare to build their country and support the interim government."
The Somalia National Peace Conference, spearheaded by the neighboring Djibouti government, established Somalia's interim government in 2000. But since then neither the country's first interim President Abdiqasim Salad Hasan nor Yusuf and his cabinet have been able to establish rule. The government was forced into exile first in Jowhar north of the capital and most recently in the south-central town of Baidoa.
Ethiopian troops are now helping keep the peace in Mogadishu, but are set to withdraw in a few weeks, Reuters reported. An African Union force is expected to replace them.
Uganda already has promised 1,000 troops as part of such a force and diplomats meeting at the African Union Peace and Security Council conference in Addis Ababa Monday said Nigeria and South Africa also may send troops.
The AU has plans to approach the European Union, the United Nations and the Arab League to help pay for a troop deployment, according to Reuters.
On Sunday, Jendayi Frazer, U.S. assistant secretary of state for African Affairs, said the United States also would contribute diplomatic and financial resources to a Somalia mission.
Few Islamist fighters are left in Mogadishu, but there have been several attacks on Ethiopian soldiers in the city in the last few days, Reuters reported.
A majority of the Islamist fighters have been forced to the country's southern border with Kenya, where on Monday Ethiopian planes bombed suspected Islamist hideouts, according to the AP.
The United States, Ethiopia and Somalia claim the SICC and its fighters have ties to al-Qaida and that al-Qaida members visited one particular hideout in the south, Ras Kamboni, following the Sept. 11, 2001, attacks. The SICC denies the claim.