The French warship is part of the EU's operation in the Gulf of Aden
A French warship has captured 11 pirates off the coast of Kenya, amid clamour for the international community to deal with the problem of piracy.
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.
The French defence ministry said the warship Nivose captured the pirates about 550 miles (900km) east of the Kenyan port of Mombasa.
It had detected a "mother ship", or command vessel, on Tuesday, and observed it overnight before launching an assault early on Wednesday, the ministry said.
An attack on a Liberian-registered vessel was also thwarted, the ministry added.
The Nivose is part of the European Union's operation to protect shipping in the Gulf of Aden.
Meanwhile, a Greek-owned merchant vessel taken on 19 March was released by pirates, but there were no details of whether a ransom was paid.
The St Vincent-flagged Titan, with its 24 crew members all well, was now heading to its original destination of South Korea, the Greek maritime ministry said.
Despite several anti-piracy patrols, there has been an increase in raids in the past few days, with four ships seized and others attacked.
The United Nations special envoy for Somalia, Ahmedou Ould-Abdallah, said the attacks risked international security.
The Liberty Sun attack was said to be in revenge for the deaths of pirates
In a BBC interview, he also called for help for poor Somalis themselves, many of whom were being exploited by the pirates.
"What is important is to show determination as the international naval presence is doing," he said. "You will see in the next few weeks a sharp decrease in piracy.
"They already are going further south and at the same time we should do something inland, trying to provide more jobs for these unfortunate youngsters who are exploited by the financiers who are backing piracy."
Somalia's Minister for International Co-operation, Abdlrahman Warsame, told the BBC's Focus on Africa programme: "The problem on the Somali piracy
always lies on the land.
"If you can solve the problem on the land - and that means support the current national unity government - you'll easily stop the piracy."
Pirates have vowed to avenge the deaths of those killed in recent rescue operations by US and French forces.
After the attack on Liberty Sun, one pirate, Abdi Garad, told AFP news agency they had intended to destroy the ship and its crew.
He said: "The aim of this attack was totally different. We were not after a ransom.
"We also assigned a team with special equipment to chase and destroy any ship flying the American flag in retaliation for the brutal killing of our friends."
Three pirates were killed during the rescue of Captain Richard Phillips of the Maersk Alabama, who had been held captive for five days after being taken hostage from his ship.
Two more Somali pirates were killed in a French operation to free five hostages from a captured yacht.
Marines managed to free four hostages but the boat's owner, Florent Lemacon, was killed.
A post-mortem examination will be carried out on Mr Lemacon later this week to try to determine whether he was killed by the pirates or by a stray French bullet.
Three other pirates detained in that operation have arrived in France for questioning. The trio were in custody at a police facility in the north-western French town of Rennes.
It is understood the pirates, who are aged between 20 and 25 years, have spent the day being questioned by French investigators.
At least six other pirates are already in French custody after being captured by French marines last year.
In recent months Britain, the US, and the European Union have signed memorandums of understanding with Nairobi that Kenya will act as a kind of international tribunal for pirate crimes.
Several Somali pirates turned over by the US and Germany are already undergoing legal action there but, so far, Paris prefers to try captured pirates in French courts.