Somali insurgents have attacked the capital's seaport as African Union (AU) troops sought to secure the area for AU military equipment arriving by sea.
AU troops have reinforced positions around the presidential palace
AU spokesman Paddy Ankunda said the attack, which killed five people, will not deter them from their mission.
Meanwhile, security has been beefed up around the presidential palace as the AU's security chief arrived for talks with the country's interim president.
A UN convoy has also been attacked - three Somali policemen were wounded.
Thousands have fled Mogadishu since the Islamists were ousted last year.
The government blames remnants of the Union of Islamic Courts for the escalating violence in Mogadishu and plans to forcefully disarm residents at the capital which is awash with weapons.
Ethiopian troops, who have been in the city since December supporting Somali forces loyal to the transitional government, have been gradually handing over responsibilities to the 1,200-strong AU force
Sporadic mortar attacks
"Six mortars landed inside the port but none of our soldiers was wounded since we had taken the necessary precautions," Captain Ankunda said.
The BBC's Mohammed Olad Hassan in Mogadishu says the attack was launched after AU troops suspended activities at the port to enable them off-load military equipment.
Government troops backed by Ethiopians retaliated and during a heavy exchange 14 people were caught in the crossfire, our reporter says.
Insurgents have continued sporadic mortar attacks near the port.
The AU troops from Uganda have now reinforced positions around the presidential palace a day after taking over security duties at the port.
Mr Djinnit is in Mogadishu on a one-day visit for talks with President Abdullahi Yusuf.
More peacekeepers from Nigeria, Ghana and other countries are due to arrive in Somalia in the next few weeks.
Hundreds of people were spotted fleeing from the capital aboard mini-buses on Tuesday following Monday night's heavy fire exchange between government troops and insurgents.
Somalia enjoyed a six-month lull in the insecurity that had dogged the country for the past 16 years, when the UIC took power last year.
But violence has escalated in the capital over the last two months.
The UN says some, 40,000 people have fled from Mogadishu since February following the violence.
Somalia's deputy Defence Minister Salad Ali Jelle has announced plans to deploy 4,000 newly trained soldiers to disarm residents at the capital.
Mr Jelle pledged that the troops will pacify the city in 30 days ahead of the relocation of the government from its temporary sit in Baidoa.
The parliament has approved plans to move the cabinet from Baidoa to Mogadishu.