"It is time to work together for the wellbeing of Somalia," Gidi told thousands of Somalis in northern Mogadishu during his first visit to the capital since taking office last year.
"It is time to accept the conclusion of a long peace process that was negotiated by regional countries," Gidi said in a speech apparently aimed at the chiefs who occupy positions in the transitional institutions and who have opposed his plans to relocate the government to the regional towns of Baidoa or Jowhar.
Earlier in the day, Gidi told the thousands who turned out waving banners to welcome him at the K-50 airport about 50km from Mogadishu that he was delighted with their reception.
"This shows your desire (to see) the transitional federal government of Somalia working. You are people who deserve good leadership and I appreciate your goodwill to my government," he said.
The motorcade of the prime minister, who was accompanied by several African Union and Arab League diplomats, was escorted by dozens of armed men and more than 30 pickup trucks mounted with machine guns.
The exiled government say the
capital is still too insecure
The airport was surrounded by armed men as Gidi's plane touched down and armed units were stationed the whole length of the road into Mogadishu.
Gidi's trip is an attempt to heal a rift within his cabinet over when and where to move the government.
Relocating to Mogadishu?
He and President Abd Allah Yusuf Ahmad favour relocating to the towns of Baidoa and Jowhar owing to continued insecurity in Mogadishu, a proposal that has drawn heavy criticism from their opponents, many of whom are adamant that any relocation must be to the capital.
Yet Gidi himself did hint on Friday, for the first time, that his government might in fact relocate to Mogadishu, telling the assembled crowd the capital "must be peaceful and able to accommodate the transitional federal government as a whole".
Somali lawmakers came to blows over the relocation issue last month, and scores of them embarked on unilateral missions to Mogadishu in a bid to sort out the mess.
Last week, Yusuf, backed by the United nations, appealed to those in Mogadishu to return to Kenya for a final meeting on the relocation issue, but the appeal fell on deaf ears.
Bullet-scarred Mogadishu has long been a hub of instability in Somalia which has been ruled by warring tribal chiefs since the Horn of Africa nation was plunged into anarchy after the 1991 ouster of clan leader Muhammad Siad Barri.