Somali warlords agreed on Friday to merge their forces into a new national army to tame the anarchic nation, but fighting outside the presidential palace where they met showed how hard that task will be, Reuters reported. Warlord gunmen trying to force their way inside fought Somali troops and the shootout -- the kind of clash commonplace in Mogadishu for the last 15 years -- killed a handful of people. It underscored the huge challenge President Abdullahi Yusuf's fledgling government faces to bring peace and security to the Horn of Africa nation after ousting Islamists who had held the capital and the south for half a year. "The warlords have promised to hand over their weapons and militias to the government," government spokesman Abdirahman Dinari said, adding that a committee had been formed to work out details of what many see as a key step in calming Somalia. Dinari said warlord gunmen tried to force their way inside Villa Somalia, the compound of former President Mohamed Siad Barre until his 1991 overthrow ushered in anarchy. "Fighting ensued. It went on for nearly four minutes," he said. Two militiamen were killed and four wounded, Dinari said, while a warlord ally who declined to give his name said seven warlord gunmen died and 11 were wounded. The villa, where Yusuf came on Monday in his first visit to the city since 1994 despite being elected president two years ago, is protected by Ethiopian and Somali government troops who ousted the Islamists in a lightning offensive late in December. The Islamists, who wanted to impose sharia law, had driven out the warlords from much of southern Somalia after taking control of Mogadishu in June following four months' fighting.