( CNN ) -- A pirate was killed and several others were detained after a security team thwarted an attack in waters off Somalia , authorities said Wednesday . The incident happened Tuesday as a Panamanian-flagged cargo ship , the MV Almezaan , was headed to Mogadishu , said the European Union Naval Force . A private security team that was on board the ship returned fire when pirates tried to attack the vessel . The security team was able to repel two attack attempts . The EU naval force was called in , boarded the three pirate ships and detained six suspects . They also found one pirate who had died of a gunshot wound , the naval force said . No further details were immediately available about his death . The waters off the Somali coast -- the Gulf of Aden and the Indian Ocean -- have been plagued by Somali pirates . The international community has adopted measures such as escorts and monitoring to crack down on piracy . Two cargo ships were seized in the area on Tuesday , the EU naval force reported . Hijackers took control of one ship in the Indian Ocean and were apparently taking it to Somalia , EUNAVFOR said . The MV Frigia , a Turkish-owned and Maltese-flagged cargo vessel , had been headed east from Port Said in Egypt to Kaousichang in Thailand . The ship was moving west and appeared to be heading toward one of the so-called pirate ports off the coast of Somalia . There are 21 crew members on the ship , 19 Turkish and two Ukrainian . Also , the Bermuda-flagged and Virgin Islands-owned MV Talca was hijacked in the Gulf of Aden , EU NAVFOR said . That hijacking took place off the coast of Oman and 180 miles south of Mazera . The ship had been heading from Sokhna , Egypt , to Busheir , Iran . Twenty-three crew members are from Sri Lanka , one is from the Philippines and another is from Syria .
Private security force on cargo ship repels two attacks by pirates near Somalia . British naval forces called in , boards three pirate ships , detains six suspects . One Somali pirate found dead on attackers ' boat , police says . Two other ships are seized by hijackers Tuesday in waters near Somalia .