There is a term the Germans use entitled verzeitlichung which means something similar to 'inserting modern terms into historical processes'. That's what I'm going to do here, even though the term is somewhat negative.
One of my ex-Army mates now studies Archaeology. When he isn't busy making chest rigs for Archaeology digs, wearing an indy jones hat, and unearthing unspeakable ancient evils, he's sending me swarming tactics found in history texts.
The first image is from 'Discovery under the southern cross' by Roslyn Poignant. It depicts an English and Dutch force swarming a Portugese carrack in the Malacca Straits (... and their modern geographic counterparts). My mate was reading the book and had heard about the Iranian swarming incident and the picture jumped out at him.
Secondly, he then came across another bit of writing from ‘Empires’, by George Raudzens on Portuguese ships being swarmed.
So the African elite was in control because it had the numbers and also the political cohesion and economic independence to accept or repel the Europeans along the coasts. The Portuguese had too few people or ships for territorial conquest. Later, between 1579 and 1591, they did fight for territory in Angola, and did make some gains, but only by becoming in effect auxiliaries to warring African kingdoms. In combat, high-sided Portuguese ships, especially when fully armed with guns in the 16th century, were reasonably safe from African assault but in most other ways the Africans, it is now believed, could outfight Europeans with little trouble. Ivana Elbl sums up the military balance as follows:My mate ends with "It then goes on to talk about how the trade monopoly did give Portugal a big advantage over these African nations (due in part to their martial prowess on the open ocean)."
The Portuguese were well aware of the precariousness of their situation. Their technology – fortifications, weaponry, and sailing ships armed with artillery – was of little advantage in African conditions. In confined coastal waters and on rivers, the sailing ships were vulnerable to concentrated attacks by large war canoes and often fell prey to determined African parties. Metal armour was a torment in a tropical climate. The late 15th and early 16th century firearms were often too clumsy to have more than a psychological effect against small or moving targets. While the Portuguese certainly could look after themselves militarily, African weaponry and tactics were still highly effective against them, and poisoned arrows caused horrible damage. The Portuguese outposts on the African mainland were small. The largest, Sao Jorge da Mina, was manned by only 50 to 55 people, only about 1/3 of whom were professional soldiers. The crown outposts lived in an all too justified fear of attack. Axim, a small Portuguese fortress near Cape Three Points on the Gold Coast, was overrun and looted in 1525 by the neighbouring Ahanta warriors lured by easy opportunity, and the Gwato factory was perennially at the mercy of the oba of Benin. Small size and distance from home made these installations quite susceptible to sustained attack ... Assuring the goodwill of the African political elite was the key importance to the Portuguese.
He also typed it out of the text, so there may be one or two mistakes.
Update: Those who are still having trouble with pirates in this day and age should consider the quality anti-pirate product in the following video.