The gang was captured by a warship from an EU piracy patrol, French officials said, hours after a failed attack on a US ship.
Other pirates released a Greek ship and its 24 crew held since mid-March.
News of the incidents came as the UN special envoy for Somalia said the attacks threatened international peace. The latest raid involved pirates firing rocket-propelled grenades and automatic weapons at a US-flagged cargo ship, the Liberty Sun, which was carrying food aid for Africa.
Other pirates released a Greek ship and its 24 crew held since mid-March.
News of the incidents came as the UN special envoy for Somalia said the attacks threatened international peace. The latest raid involved pirates firing rocket-propelled grenades and automatic weapons at a US-flagged cargo ship, the Liberty Sun, which was carrying food aid for Africa.