Somalia's interim Prime Minister Ali Mohammed Ghedi has called for a ceasefire with the Union of Islamic Courts, which controls the capital.
Ghedi called on the Islamic courts to talk to the goverment
He called on the Islamists to join peace talks in Sudan, to which Mr Ghedi said he would send a delegation.
The UIC has been advancing north of Mogadishu, and at the weekend took control of Harardhere port which had been used as a base for piracy.
Kenyan officials visited Somalia on Sunday in a move to promote dialogue.
Talks between the interim government and the courts are very important for the future of Somalia, Prime Minister Ghedi said.
Tensions between the government and Islamists have prompted fears of escalated conflict.
Mr Ghedi was earlier reluctant to enter dialogue with the UIC, a stance that led to mass resignations from his government.
He warned that any escalation of hostilities would only derail the current peace process and the international efforts to help Somalia stand again on its own legs.
The UIC, for its part, has said it will take part in talks only if Ethiopia - which supports the transitional government - withdraws its troops from Somalia.
Ethiopia denies having sent soldiers into Somalia.
Kenyan Assistant Foreign Minister Moses Watangula led the delegation that visited Somalia on Sunday.
"We encourage the transitional federal government and the leadership of the Islamic courts to promote peaceful negotiations between them," said Mr Watangula.
"We urge all sides, the Islamic courts leadership in particular, to avoid any escalation of hostilities in Somalia and come around the negotiation table in the context of respecting the country's transitional charter" he said.
An Islamist spokesman said Islamist militia met little resistance when they took control of Harardhere, north of Mogadishu.
Islamist militia are making gains in Somalia
They told residents that from now on piracy would be a crime.
Somalia's coast is one of the world's worst areas for piracy, but incidents have reportedly declined since the Islamic militia made territory gains.
In the past week, militia loyal to the UIC have also taken control of the strategic central town of Beletuein.
Somalia's interim government controls little more than the town of Baidoa, where it is based.
The Somali parliament is due to receive the names of a newly-appointed cabinet, after the previous government was sacked last week.
Mr Ghedi and President Abdullahi Yusuf agreed to dissolve the cabinet, after 40 members of the 100-strong government resigned in protest at the presence of Ethiopian troops, and Mr Ghedi's opposition to talks with the Islamists.
Ethiopia warned on Saturday that Somalia's interim government is in danger of being sidelined by the growth in power of the Islamic courts.
Militia controlled by the courts have pushed north into central Somalia over the past week, taking control of the strategic town of Beletuein.
The Ethiopian foreign ministry said much of the power within the courts has fallen into the hands of "terrorist" elements.
There are fears that Ethiopia could intervene to shore up Mr Ghedi's government
There are also reports of Ethiopian troops crossing over the border, of arms flooding into Somalia both from Ethiopia and its regional rival Eritrea, despite an embargo.
Both Ethiopia and Eritrea deny backing rival factions in Somalia
Somalia has had no effective central government since the ousting of dictator Siad Barre in 1991.