Other than primitive areas like Brazil, Angola and Mozambique the rest of the Portuguese Empire were just port cities. They would come to a port and threaten the local leaders to pay tribute or else have their city razed to the ground with their cannons. Read the history of Vasco da Gama if you think I'm wrong.
Still. Their army was dispersed all over the globe, they were not concentrated in one area. This is the point that we are trying to make here. Yall make it out as if they have undertaken some grand expedition that required all of their manpower. They were merely toying with the coastal dwellers in Mogadishu, nothing serious man.
I'll tell you what happened... To begin with, it was the lands that my ancestors were dwelling in that they invaded. They ruled my ancestors for a while, this is in our books and oral tradition. I doubt their numbers surpassed triple digits, honestly. They got driven out by a group of fkin Barawanis and Swahili Arabs.
Tristão da Cunha then set his eyes on Ajuran territory, where the battle of
Barawa was fought. After a long period of engagement, the Portuguese soldiers burned the city and looted it.
However, fierce resistance by the local population and soldiers resulted in the Portuguese's failure to permanently occupy the city, and the inhabitants who had fled to the interior would eventually return and rebuild the city. After Barawa, Tristão would set sail for
Mogadishu, which was the richest city on the East African coast.
They came back a while later with a slightly larger troop and managed to occupy the city ultimately leading to a "war":
Ottoman-Somali cooperation against the Portuguese in the
Indian Ocean reached a high point in the 1580s when Ajuran clients of the Somali coastal cities began to sympathize with the
Arabs and
Swahilis under Portuguese rule and sent an envoy to the
Turkish corsair
Mir Ali Beyfor a joint expedition against the Portuguese.
Clearly the Portuguese were not too invested in Somalia, otherwise they would have made efficacious use of their manpower.